blob: b00a6eccb4a5c4d6bca5b43451ad9e2e0c0637b2 [file] [log] [blame]
Giorgi Lekveishvili8c99d622023-05-30 14:40:50 +04001{{- if and .Values.metrics.enabled .Values.metrics.customMetrics (eq .Values.architecture "replication") }}
2apiVersion: v1
3kind: ConfigMap
4metadata:
5 name: {{ printf "%s-metrics" (include "postgresql.readReplica.fullname" .) }}
6 namespace: {{ .Release.Namespace | quote }}
7 labels: {{- include "common.labels.standard" . | nindent 4 }}
8 {{- if .Values.commonLabels }}
9 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
10 {{- end }}
11 {{- if .Values.commonAnnotations }}
12 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
13 {{- end }}
14data:
15 custom-metrics.yaml: {{ toYaml .Values.metrics.customMetrics | quote }}
16{{- end }}