From 2bed17e3241dc3a04e526e28746d8876da7a1acd Mon Sep 17 00:00:00 2001 From: Sjouke de Vries Date: Fri, 2 Dec 2022 16:33:18 +0100 Subject: [PATCH] [postgresql-ha] backwards compat postgres-password (#13809) Signed-off-by: Sjouke de Vries Signed-off-by: Sjouke de Vries --- bitnami/postgresql-ha/Chart.yaml | 2 +- .../postgresql-ha/templates/postgresql/statefulset.yaml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bitnami/postgresql-ha/Chart.yaml b/bitnami/postgresql-ha/Chart.yaml index f4fc7e844..0c25448ca 100644 --- a/bitnami/postgresql-ha/Chart.yaml +++ b/bitnami/postgresql-ha/Chart.yaml @@ -29,4 +29,4 @@ name: postgresql-ha sources: - https://github.com/bitnami/containers/tree/main/bitnami/postgresql - https://www.postgresql.org/ -version: 10.0.6 +version: 10.0.7 diff --git a/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml b/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml index ba80d4e7a..f61c03cef 100644 --- a/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml +++ b/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml @@ -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