[bitnami/postgresql-repmgr] Delay custom pg_hba.conf injection #73570
+20
−20
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.
Description of the change
This container applies custom
pg_hba.conf
right before initialization process. This will cause an issue when we set security onpg_hba.conf
. What this PR does is delaying custompg_hba.conf
injection untilpostgresql_initialize
has been executed just likeREPMGR_PGHBA_TRUST_ALL=no
did to replacetrust
withmd5
here:containers/bitnami/postgresql-repmgr/16/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh
Lines 865 to 867 in 2de4377
Benefits
Let user to customize
pg_hba.conf
without breaking initialization process, example:Possible drawbacks
Other logic still able to break initialization process
Applicable issues
Additional information
If we want to adapt this PR to
bitnami/postgresql
, I think we should refactor these lines:containers/bitnami/postgresql/17/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh
Lines 610 to 613 in 56c51a6
containers/bitnami/postgresql/17/debian-12/rootfs/opt/bitnami/scripts/postgresql/setup.sh
Lines 45 to 49 in 56c51a6