d2178c077e53a648cd47f3186e2cf8c683e1ed4d
[it/dep.git] / ric-aux / helm / infrastructure / subcharts / kong / charts / postgresql / templates / configmap.yaml
1 {{ if and (or (.Files.Glob "files/postgresql.conf") (.Files.Glob "files/pg_hba.conf") .Values.postgresqlConfiguration .Values.pgHbaConfiguration) (not .Values.configurationConfigMap) }}
2 apiVersion: v1
3 kind: ConfigMap
4 metadata:
5   name: {{ template "postgresql.fullname" . }}-configuration
6   labels:
7     app: {{ template "postgresql.name" . }}
8     chart: {{ template "postgresql.chart" . }}
9     release: {{ .Release.Name | quote }}
10     heritage: {{ .Release.Service | quote }}
11 data:
12 {{- if (.Files.Glob "files/postgresql.conf") }}
13 {{ (.Files.Glob "files/postgresql.conf").AsConfig | indent 2 }}
14 {{- else if .Values.postgresqlConfiguration }}
15   postgresql.conf: |
16 {{- range $key, $value := default dict .Values.postgresqlConfiguration }}
17     {{ $key | snakecase }}={{ $value }}
18 {{- end }}
19 {{- end }}
20 {{- if (.Files.Glob "files/pg_hba.conf") }}
21 {{ (.Files.Glob "files/pg_hba.conf").AsConfig | indent 2 }}
22 {{- else if .Values.pgHbaConfiguration }}
23   pg_hba.conf: |
24 {{ .Values.pgHbaConfiguration | indent 4 }}
25 {{- end }}
26 {{ end }}