1 {{- if (include "postgresql.createSecret" .) }}
5 name: {{ include "common.names.fullname" . }}
6 namespace: {{ .Release.Namespace | quote }}
7 labels: {{- include "common.labels.standard" . | nindent 4 }}
8 {{- if .Values.commonLabels }}
9 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
11 {{- if .Values.commonAnnotations }}
12 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
16 {{- if .Values.auth.enablePostgresUser }}
17 postgres-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "postgres-password" "providedValues" (list "global.postgresql.auth.postgresPassword" "auth.postgresPassword") "context" $) }}
19 {{- if not (empty (include "postgresql.username" .)) }}
20 password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "password" "providedValues" (list "global.postgresql.auth.password" "auth.password") "context" $) }}
22 {{- if eq .Values.architecture "replication" }}
23 replication-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "replication-password" "providedValues" (list "auth.replicationPassword") "context" $) }}
25 # We don't auto-generate LDAP password when it's not provided as we do for other passwords
26 {{- if and .Values.ldap.enabled (or .Values.ldap.bind_password .Values.ldap.bindpw) }}
27 ldap-password: {{ coalesce .Values.ldap.bind_password .Values.ldap.bindpw | b64enc | quote }}