From d5ebecf04002f12f836934a685c506c85aae107e Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Mon, 27 Sep 2021 10:28:12 -0300 Subject: [PATCH] Fix pg_dump cmd in velero pre backup hook --- charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml | 5 ++++- charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml | 5 ++++- charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml | 5 ++++- 3 files changed, 12 insertions(+), 3 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 3ce62e7..3bc3187 100644 --- a/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml +++ b/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml @@ -49,7 +49,10 @@ spec: app.kubernetes.io/name: postgresql pre: - exec: - command: "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump" + command: + - "/bin/bash" + - "-c" + - "/opt/bitnami/postgresql/bin/pg_dump -U postgres 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 93bf293..fc65a10 100644 --- a/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml +++ b/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml @@ -49,7 +49,10 @@ spec: app.kubernetes.io/name: postgresql pre: - exec: - command: "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump" + command: + - "/bin/bash" + - "-c" + - "/opt/bitnami/postgresql/bin/pg_dump -U postgres 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 cd73756..fda990a 100644 --- a/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml +++ b/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml @@ -49,7 +49,10 @@ spec: app.kubernetes.io/name: postgresql pre: - exec: - command: "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump" + command: + - "/bin/bash" + - "-c" + - "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump" timeout: 360s useOwnerReferencesInBackup: false {{- end }} \ No newline at end of file