Skip to content

Commit

Permalink
Have one podmonitor per shard
Browse files Browse the repository at this point in the history
Issue: ZENKO-4641
  • Loading branch information
williamlardier committed Dec 27, 2024
1 parent 66d1553 commit 2c09b1d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ SPDX-License-Identifier: APACHE-2.0
*/}}

{{- if and .Values.shards .Values.metrics.enabled .Values.metrics.podMonitor.enabled }}
{{- $i := 0 }}
{{- $replicas := .Values.shards | int }}
{{- range $i, $e := until $replicas }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
Expand Down Expand Up @@ -35,4 +36,6 @@ spec:
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: shardsvr
shard: {{ $i | quote }}
{{- end }}
{{- end }}

0 comments on commit 2c09b1d

Please sign in to comment.