From e94421fb5bc72faeff1d750ec019defced2a5646 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Thu, 18 Nov 2021 17:04:21 -0300 Subject: [PATCH] Fix issue with postgres backup hook --- charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml | 4 ++-- charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml | 2 +- charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml b/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml index bee4df8..08fdd96 100644 --- a/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml +++ b/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml @@ -53,8 +53,8 @@ spec: - exec: command: - "/bin/bash" - - "-c" - - "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump" + - "-c" + - "'PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dump -U sapl sapl > /bitnami/postgresql/sapl.dump'" timeout: 360s useOwnerReferencesInBackup: false {{- end }} \ No newline at end of file diff --git a/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml b/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml index a3a9f5b..a25c9ff 100644 --- a/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml +++ b/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml @@ -54,7 +54,7 @@ spec: command: - "/bin/bash" - "-c" - - "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump" + - "'PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dump -U sapl sapl > /bitnami/postgresql/sapl.dump'" timeout: 360s useOwnerReferencesInBackup: false {{- end }} \ No newline at end of file diff --git a/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml b/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml index 074d102..90f34dc 100644 --- a/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml +++ b/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml @@ -53,8 +53,8 @@ spec: - exec: command: - "/bin/bash" - - "-c" - - "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump" + - "-c" + - "'PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dump -U sapl sapl > /bitnami/postgresql/sapl.dump'" timeout: 360s useOwnerReferencesInBackup: false {{- end }} \ No newline at end of file