Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/keycloak] add variables to support hostname v2 #70466

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ keycloak_env_vars=(
KEYCLOAK_HTTPS_PORT
KEYCLOAK_BIND_ADDRESS
KEYCLOAK_HOSTNAME
KEYCLOAK_HOSTNAME_ADMIN
KEYCLOAK_HOSTNAME_STRICT
KEYCLOAK_INIT_MAX_RETRIES
KEYCLOAK_CACHE_TYPE
KEYCLOAK_CACHE_STACK
Expand Down Expand Up @@ -70,6 +72,8 @@ keycloak_env_vars=(
KEYCLOAK_DAEMON_GROUP
KEYCLOAK_ADMIN_USER
KC_HOSTNAME
KC_HOSTNAME_ADMIN
KC_HOSTNAME_STRICT
KC_HTTPS_TRUST_STORE_FILE
KC_HTTPS_TRUST_STORE_PASSWORD
KC_HTTPS_KEY_STORE_FILE
Expand Down Expand Up @@ -131,6 +135,10 @@ export KEYCLOAK_HTTPS_PORT="${KEYCLOAK_HTTPS_PORT:-8443}"
export KEYCLOAK_BIND_ADDRESS="${KEYCLOAK_BIND_ADDRESS:-$(hostname --fqdn)}"
KEYCLOAK_HOSTNAME="${KEYCLOAK_HOSTNAME:-"${KC_HOSTNAME:-}"}"
export KEYCLOAK_HOSTNAME="${KEYCLOAK_HOSTNAME:-}"
KEYCLOAK_HOSTNAME_ADMIN="${KEYCLOAK_HOSTNAME_ADMIN:-"${KC_HOSTNAME_ADMIN:-}"}"
export KEYCLOAK_HOSTNAME_ADMIN="${KEYCLOAK_HOSTNAME_ADMIN:-}"
KEYCLOAK_HOSTNAME_STRICT="${KEYCLOAK_HOSTNAME_STRICT:-"${KC_HOSTNAME_STRICT:-}"}"
export KEYCLOAK_HOSTNAME_STRICT="${KEYCLOAK_HOSTNAME_STRICT:-false}"
export KEYCLOAK_INIT_MAX_RETRIES="${KEYCLOAK_INIT_MAX_RETRIES:-10}"
export KEYCLOAK_CACHE_TYPE="${KEYCLOAK_CACHE_TYPE:-ispn}"
export KEYCLOAK_CACHE_STACK="${KEYCLOAK_CACHE_STACK:-}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ keycloak_configure_health_endpoints() {
keycloak_configure_hostname() {
info "Configuring hostname settings"
! is_empty_value "$KEYCLOAK_HOSTNAME" && keycloak_conf_set "hostname" "${KEYCLOAK_HOSTNAME}"
keycloak_conf_set "hostname-strict" "false"
singhbaljit marked this conversation as resolved.
Show resolved Hide resolved
! is_empty_value "$KEYCLOAK_HOSTNAME_ADMIN" && keycloak_conf_set "hostname-admin" "${KEYCLOAK_HOSTNAME_ADMIN}"
keycloak_conf_set "hostname-strict" "${KEYCLOAK_HOSTNAME_STRICT}"
}

########################
Expand Down
2 changes: 2 additions & 0 deletions bitnami/keycloak/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ docker build -t bitnami/APP:latest .
| `KEYCLOAK_HTTPS_PORT` | HTTPS port | `8443` |
| `KEYCLOAK_BIND_ADDRESS` | Bind address | `$(hostname --fqdn)` |
| `KEYCLOAK_HOSTNAME` | Keycloak hostname | `nil` |
| `KEYCLOAK_HOSTNAME_ADMIN` | Keycloak admin hostname | `nil` |
| `KEYCLOAK_HOSTNAME_STRICT` | Disables dynamically resolving the hostname from request headers | `false` |
| `KEYCLOAK_INIT_MAX_RETRIES` | Maximum retries for checking that the database works | `10` |
| `KEYCLOAK_CACHE_TYPE` | Defines the cache mechanism for high-availability. | `ispn` |
| `KEYCLOAK_CACHE_STACK` | Apply a specific cache stack | `nil` |
Expand Down
Loading