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 $POSTGRES_USER -d {{ include "postgres.dbName" . }} > /postgres_backups/$BACKUP_NAME;