From 845b769998f568d004aefabe66697215c6ecfa40 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Tue, 3 Dec 2024 15:47:28 +0100 Subject: [PATCH] [bitnami/postgresql-repmgr] Release postgresql-repmgr-14.15.0-debian-12-r2 (#75338) Signed-off-by: Bitnami Bot --- bitnami/postgresql-repmgr/14/debian-12/Dockerfile | 4 ++-- .../debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh | 2 +- .../debian-12/rootfs/opt/bitnami/scripts/postgresql-env.sh | 1 + .../rootfs/opt/bitnami/scripts/postgresql-repmgr/setup.sh | 6 ++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bitnami/postgresql-repmgr/14/debian-12/Dockerfile b/bitnami/postgresql-repmgr/14/debian-12/Dockerfile index 58cb5b724f11..fff80884a097 100644 --- a/bitnami/postgresql-repmgr/14/debian-12/Dockerfile +++ b/bitnami/postgresql-repmgr/14/debian-12/Dockerfile @@ -8,11 +8,11 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2024-11-27T09:28:41Z" \ + org.opencontainers.image.created="2024-12-03T14:27:03Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr/README.md" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="14.15.0-debian-12-r1" \ + org.opencontainers.image.ref.name="14.15.0-debian-12-r2" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr" \ org.opencontainers.image.title="postgresql-repmgr" \ org.opencontainers.image.vendor="Broadcom, Inc." \ diff --git a/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh b/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh index ac1a25156502..74e19f4b9660 100644 --- a/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh +++ b/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh @@ -612,7 +612,7 @@ postgresql_initialize() { create_conf_file=no fi - if postgresql_is_file_external "pg_hba.conf"; then + if postgresql_is_file_external "pg_hba.conf" && is_boolean_yes "$POSTGRESQL_USE_CUSTOM_PGHBA_INITIALIZATION"; then info "Custom configuration $POSTGRESQL_PGHBA_FILE detected" create_pghba_file=no fi diff --git a/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/postgresql-env.sh b/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/postgresql-env.sh index a6ea9b0042ff..9e2a51d67024 100644 --- a/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/postgresql-env.sh +++ b/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/postgresql-env.sh @@ -372,6 +372,7 @@ export POSTGRESQL_WAL_LEVEL="${POSTGRESQL_WAL_LEVEL:-replica}" export POSTGRESQL_DEFAULT_TOAST_COMPRESSION="${POSTGRESQL_DEFAULT_TOAST_COMPRESSION:-}" export POSTGRESQL_PASSWORD_ENCRYPTION="${POSTGRESQL_PASSWORD_ENCRYPTION:-}" export POSTGRESQL_DEFAULT_TRANSACTION_ISOLATION="${POSTGRESQL_DEFAULT_TRANSACTION_ISOLATION:-}" +export POSTGRESQL_USE_CUSTOM_PGHBA_INITIALIZATION="no" # pgAutoFailover settings export POSTGRESQL_AUTOCTL_VOLUME_DIR="${POSTGRESQL_VOLUME_DIR}/pgautoctl" diff --git a/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/setup.sh b/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/setup.sh index 0630d8b424c6..c293354a8770 100755 --- a/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/setup.sh +++ b/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/setup.sh @@ -35,3 +35,9 @@ repmgr_postgresql_configuration repmgr_generate_repmgr_config # Initialize PostgreSQL & repmgr repmgr_initialize + +# Set custom pg_hba.conf after initialization to avoid conflicts +if postgresql_is_file_external "pg_hba.conf"; then + info "Applying custom $POSTGRESQL_PGHBA_FILE" + cp -f "$POSTGRESQL_MOUNTED_CONF_DIR"/pg_hba.conf "$POSTGRESQL_CONF_DIR" +fi \ No newline at end of file