| Giorgi Lekveishvili | 8c99d62 | 2023-05-30 14:40:50 +0400 | [diff] [blame] | 1 | {{- if (include "postgresql.primary.createConfigmap" .) }} |
| 2 | apiVersion: v1 |
| 3 | kind: ConfigMap |
| 4 | metadata: |
| 5 | name: {{ printf "%s-configuration" (include "postgresql.primary.fullname" .) }} |
| 6 | namespace: {{ .Release.Namespace | quote }} |
| 7 | labels: {{- include "common.labels.standard" . | nindent 4 }} |
| 8 | app.kubernetes.io/component: primary |
| 9 | {{- if .Values.commonLabels }} |
| 10 | {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} |
| 11 | {{- end }} |
| 12 | {{- if .Values.commonAnnotations }} |
| 13 | annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} |
| 14 | {{- end }} |
| 15 | data: |
| 16 | {{- if .Values.primary.configuration }} |
| 17 | postgresql.conf: |- |
| 18 | {{- include "common.tplvalues.render" ( dict "value" .Values.primary.configuration "context" $ ) | nindent 4 }} |
| 19 | {{- end }} |
| 20 | {{- if .Values.primary.pgHbaConfiguration }} |
| 21 | pg_hba.conf: | |
| 22 | {{- include "common.tplvalues.render" ( dict "value" .Values.primary.pgHbaConfiguration "context" $ ) | nindent 4 }} |
| 23 | {{- end }} |
| 24 | {{- end }} |