16 lines
405 B
YAML
16 lines
405 B
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: "postgres-backup-hook-config-map"
|
|
annotations:
|
|
rollme: {{ randAlphaNum 5 | quote }}
|
|
data:
|
|
entrypoint.sh: |-
|
|
#!/bin/sh
|
|
cmd="/docker-entrypoint.sh postgres"
|
|
eval "${cmd}" & disown;
|
|
until pg_isready; do
|
|
sleep 5;
|
|
done;
|
|
pg_dump -U {{ .Values.postgresqlUser }} -d {{ .Values.postgresqlDatabase }} > /dbbackups/$BACKUP_NAME;
|