CrunchyData / crunchy-containers

Containers for Managing PostgreSQL on Kubernetes by Crunchy Data
https://www.crunchydata.com/
Apache License 2.0
1.01k stars 328 forks source link

Add pgBackRest Script to Base PG Container & Hide Sensitive pgBackRest Config #1378

Closed andrewlecuyer closed 3 years ago

andrewlecuyer commented 3 years ago

The crunchy-postgres container now hides sensitive pgBackRest env vars when printing pgBackRest configuration during container startup:

Sun Aug  8 18:12:31 UTC 2021 INFO: pgBackRest: The following pgbackrest env vars have been set:
PGBACKREST=true
PGBACKREST_LOG_PATH=/tmp
PGBACKREST_PG1_PATH=/pgdata/backrest
PGBACKREST_REPO1_PATH=/backrestrepo/backrest-backups
PGBACKREST_REPO1_S3_KEY=*********
PGBACKREST_REPO1_S3_KEY_SECRET=*********
PGBACKREST_STANZA=db
Sun Aug  8 18:12:32 UTC 2021 INFO: pgBackRest: Executing 'stanza-create' to create stanza 'db'..
2021-08-08 18:12:32.018 P00   INFO: stanza-create command begin 2.33: --exec-id=117-ada47aeb --log-level-console=info --log-path=/tmp --no-online --pg1-path=/pgdata/backrest --repo1-path=/backrestrepo/backrest-backups --stanza=db
2021-08-08 18:12:32.020 P00   INFO: stanza-create for stanza 'db' on repo1
2021-08-08 18:12:32.356 P00   INFO: stanza-create command end: completed successfully (339ms)

Closes #1375 [ch12235]


Additionally, the pgbackrest_info.sh script is now included in the base PG container (the script also remains in the postgres-ha bin directory to maintain compatibility with PGO).

Closes #1376 [ch12234]