Files
charts/bitnami/postgresql-ha/templates/pgpool/configmap.yaml
2020-01-14 11:28:38 +01:00

16 lines
650 B
YAML

{{- if and (or (.Files.Glob "files/pgpool.conf") .Values.pgpool.configuration) (not .Values.pgpool.configurationCM) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-configuration" (include "postgresql-ha.pgpool" .) }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
app.kubernetes.io/component: pgpool
data:
{{- if (.Files.Glob "files/pgpool.conf") }}
{{- (.Files.Glob "files/pgpool.conf").AsConfig | nindent 2 }}
{{- else if .Values.pgpool.configuration }}
pgpool.conf: |
{{- include "postgresql-ha.tplValue" (dict "value" .Values.pgpool.configuration "context" $) | nindent 4 }}
{{- end }}
{{- end }}