configmap.yaml 1.0 KB

1234567891011121314151617181920212223242526
  1. {{- /*
  2. Copyright VMware, Inc.
  3. SPDX-License-Identifier: APACHE-2.0
  4. */}}
  5. {{- if (include "postgresql.v1.primary.createConfigmap" .) }}
  6. apiVersion: v1
  7. kind: ConfigMap
  8. metadata:
  9. name: {{ printf "%s-configuration" (include "postgresql.v1.primary.fullname" .) }}
  10. namespace: {{ .Release.Namespace | quote }}
  11. labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
  12. app.kubernetes.io/component: primary
  13. {{- if .Values.commonAnnotations }}
  14. annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  15. {{- end }}
  16. data:
  17. {{- if .Values.primary.configuration }}
  18. postgresql.conf: |
  19. {{- include "common.tplvalues.render" ( dict "value" .Values.primary.configuration "context" $ ) | nindent 4 }}
  20. {{- end }}
  21. {{- if .Values.primary.pgHbaConfiguration }}
  22. pg_hba.conf: |
  23. {{- include "common.tplvalues.render" ( dict "value" .Values.primary.pgHbaConfiguration "context" $ ) | nindent 4 }}
  24. {{- end }}
  25. {{- end }}