[RHCLOUD-30826] - Remove use of POSTGRESQL_MASTER env vars #930
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently when the ephemeral DB's start up, the container in the pod always restarts once.
If you look at the container logs, you can see it is running into this error:
And I think this is due to us setting the
POSTGRESQL_MASTER_USER
to bepostgres
-- it causes the scl container scripts to invoke this:https://github.com/sclorg/postgresql-container/blob/16cd132d4986523b531a353401e6ed4ee0703c8b/10/root/usr/share/container-scripts/postgresql/common.sh#L241
Reading through this: https://github.com/sclorg/postgresql-container/tree/16cd132d4986523b531a353401e6ed4ee0703c8b/examples/replica#postgresql_master_password it seems that the MASTER_ env vars only relate to DB replication. We don't use this feature so we don't even need to set these env vars. We should use
POSTGRESQL_ADMIN_PASSWORD
though to configure the admin password: https://github.com/sclorg/postgresql-container/tree/16cd132d4986523b531a353401e6ed4ee0703c8b/examples/replica#postgresql_password-and-postgresql_admin_passwordWe also should not need to set
PGPASSWORD
on the pods anymore, so I removed that. It doesn't look like any of the images at https://github.com/sclorg/postgresql-container use this environment variable.