[bitnami/pgbouncer] Add auth_dbname to available environment variables (#52264)

Signed-off-by: Alexander Bayandin <alexander@neon.tech>
This commit is contained in:
Alexander Bayandin
2023-12-21 12:14:46 +01:00
committed by GitHub
parent 37ce8bc8c2
commit 7e5b373d4c
3 changed files with 6 additions and 0 deletions
@@ -228,6 +228,9 @@ pgbouncer_initialize() {
if ! is_empty_value "$PGBOUNCER_AUTH_USER"; then
database_value+=" auth_user=$PGBOUNCER_AUTH_USER"
fi
if ! is_empty_value "$PGBOUNCER_AUTH_DBNAME"; then
database_value+=" auth_dbname=$PGBOUNCER_AUTH_DBNAME"
fi
if ! is_empty_value "$PGBOUNCER_CONNECT_QUERY"; then
database_value+=" connect_query='${PGBOUNCER_CONNECT_QUERY}'"
fi
@@ -29,6 +29,7 @@ pgbouncer_env_vars=(
PGBOUNCER_PORT
PGBOUNCER_LISTEN_ADDRESS
PGBOUNCER_AUTH_USER
PGBOUNCER_AUTH_DBNAME
PGBOUNCER_AUTH_QUERY
PGBOUNCER_AUTH_TYPE
PGBOUNCER_AUTH_HBA_FILE
@@ -120,6 +121,7 @@ export PGBOUNCER_DATABASE="${PGBOUNCER_DATABASE:-postgres}"
export PGBOUNCER_PORT="${PGBOUNCER_PORT:-6432}"
export PGBOUNCER_LISTEN_ADDRESS="${PGBOUNCER_LISTEN_ADDRESS:-0.0.0.0}"
export PGBOUNCER_AUTH_USER="${PGBOUNCER_AUTH_USER:-}"
export PGBOUNCER_AUTH_DBNAME="${PGBOUNCER_AUTH_DBNAME:-}"
export PGBOUNCER_AUTH_QUERY="${PGBOUNCER_AUTH_QUERY:-}"
export PGBOUNCER_AUTH_TYPE="${PGBOUNCER_AUTH_TYPE:-scram-sha-256}"
export PGBOUNCER_AUTH_HBA_FILE="${PGBOUNCER_AUTH_HBA_FILE:-}"
+1
View File
@@ -121,6 +121,7 @@ To expose a ["fallback database" (wildcard that matches any)](https://www.pgboun
### Other options
* `PGBOUNCER_AUTH_USER`: PgBouncer will use this user to connect to the database and query the PostgreSQL backend for a user and password. No defaults.
* `PGBOUNCER_AUTH_DBNAME`: PgBouncer will use this user database for authentication purposes. No defaults.
* `PGBOUNCER_AUTH_QUERY`: PgBouncer will use this query to connect to the database and query the PostgreSQL backend for a user and password. No defaults.
* `PGBOUNCER_AUTH_TYPE`: PgBouncer authentication type. Default: **scram-sha-256**
* `PGBOUNCER_AUTH_HBA_FILE`: HBA configuration file to use if auth_type is set to hba. No defaults.