[postgresql-ha] backwards compat postgres-password (#13809)

Signed-off-by: Sjouke de Vries <info@sdvservices.nl>

Signed-off-by: Sjouke de Vries <info@sdvservices.nl>
This commit is contained in:
Sjouke de Vries
2022-12-02 16:33:18 +01:00
committed by GitHub
parent 72c3f1d3bb
commit 2bed17e324
2 changed files with 9 additions and 1 deletions

View File

@@ -191,7 +191,15 @@ spec:
valueFrom:
secretKeyRef:
name: {{ include "postgresql-ha.postgresqlSecretName" . }}
{{- if (include "postgresql-ha.postgresqlCreateSecret" .) }}
key: password
{{- else }}
{{- if ( index ( lookup "v1" "Secret" (include "common.names.namespace" .) (include "postgresql-ha.postgresqlSecretName" .) ) ".data.postgres-password" ) }}
key: postgres-password
{{- else }}
key: password
{{- end }}
{{- end }}
{{- end }}
{{- if not (empty (include "postgresql-ha.postgresqlDatabase" .)) }}
- name: POSTGRES_DB