Skip to content

Commit

Permalink
[bitnami/pgbouncer] Add auth_dbname to available environment variables (
Browse files Browse the repository at this point in the history
#52264)

Signed-off-by: Alexander Bayandin <[email protected]>
  • Loading branch information
bayandin authored Dec 21, 2023
1 parent 37ce8bc commit 7e5b373
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:-}"
Expand Down
1 change: 1 addition & 0 deletions bitnami/pgbouncer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7e5b373

Please sign in to comment.