1 {{ if and (or (.Files.Glob "files/postgresql.conf") (.Files.Glob "files/pg_hba.conf") .Values.postgresqlConfiguration .Values.pgHbaConfiguration) (not .Values.configurationConfigMap) }}
5 name: {{ template "postgresql.fullname" . }}-configuration
7 app: {{ template "postgresql.name" . }}
8 chart: {{ template "postgresql.chart" . }}
9 release: {{ .Release.Name | quote }}
10 heritage: {{ .Release.Service | quote }}
12 {{- if (.Files.Glob "files/postgresql.conf") }}
13 {{ (.Files.Glob "files/postgresql.conf").AsConfig | indent 2 }}
14 {{- else if .Values.postgresqlConfiguration }}
16 {{- range $key, $value := default dict .Values.postgresqlConfiguration }}
17 {{ $key | snakecase }}={{ $value }}
20 {{- if (.Files.Glob "files/pg_hba.conf") }}
21 {{ (.Files.Glob "files/pg_hba.conf").AsConfig | indent 2 }}
22 {{- else if .Values.pgHbaConfiguration }}
24 {{ .Values.pgHbaConfiguration | indent 4 }}