Fix pg password env variable error during extension enablement
What does this MR do?
Add support for enabling extensions using either the PASSWORD or PASSWORD_FILE env variable. The PASSWORD_FILE variable takes precedence. (As that is what the upstream image does as well: https://github.com/bitnami/bitnami-docker-postgresql/blob/6d858f414577166bf33c54cbad30aa3267a46606/11/debian-10/rootfs/opt/bitnami/scripts/postgresql-env.sh#L143
As of the PG 11.8 image, (we are now on PG 11.9) the bitnami image was changed to call a script that unset the _FILE
variables.
This causes a warning during fresh installs in the postgres logs, (about an unbound variable). And an error on upgrades (only for upgrades on versions that enable additional pg extensions).
Related issues
Fixes: #2345 (closed)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
Merge Request Title and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA -
Equivalent MR/issue for omnibus-gitlab opened