Files
charts/bitnami/postgresql-ha/templates/postgresql/secrets.yaml
Javier J. Salmerón-García 8ee923ce98 [bitnami/postgresql-ha] Add standard Bitnami parameters (#3797)
* [bitnami/postgresql-ha] Add standard Bitnami parameters

* Extend the use of common

* Lint issues

* Lint
2020-10-08 10:24:41 +02:00

22 lines
1.0 KiB
YAML

{{- if (include "postgresql-ha.postgresqlCreateSecret" .) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "postgresql-ha.postgresql" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if and (include "postgresql-ha.postgresqlPostgresPassword" .) (not (eq (include "postgresql-ha.postgresqlUsername" .) "postgres")) }}
postgresql-postgres-password: {{ include "postgresql-ha.postgresqlPostgresPassword" . | b64enc | quote }}
{{- end }}
postgresql-password: {{ (include "postgresql-ha.postgresqlPassword" .) | b64enc | quote }}
repmgr-password: {{ (include "postgresql-ha.postgresqlRepmgrPassword" .) | b64enc | quote }}
{{- end -}}