Skip to content

Commit

Permalink
[bitnami/elasticsearch] Fix readiness/liveness probe not working if "…
Browse files Browse the repository at this point in the history
…restEncryption: false" in values.yaml (#47319)

Signed-off-by: Andrea Rabbaglietti <[email protected]>
  • Loading branch information
rabbagliettiandrea authored Sep 13, 2023
1 parent c21171d commit 1291c97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,9 @@ elasticsearch_healthcheck() {

host=$(get_elasticsearch_hostname)

is_boolean_yes "$DB_ENABLE_SECURITY" && is_boolean_yes "$DB_ENABLE_REST_TLS" && protocol="https" && command_args+=("-k" "--user" "${DB_USERNAME}:${DB_PASSWORD}")

is_boolean_yes "$DB_ENABLE_SECURITY" && command_args+=("-k" "--user" "${DB_USERNAME}:${DB_PASSWORD}")
is_boolean_yes "$DB_ENABLE_REST_TLS" && protocol="https"

# Combination of --silent, --output and --write-out allows us to obtain both the status code and the request body
output=$(mktemp)
command_args+=("-o" "$output" "${protocol}://${host}:${DB_HTTP_PORT_NUMBER}/_cluster/health?local=true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,9 @@ elasticsearch_healthcheck() {

host=$(get_elasticsearch_hostname)

is_boolean_yes "$DB_ENABLE_SECURITY" && is_boolean_yes "$DB_ENABLE_REST_TLS" && protocol="https" && command_args+=("-k" "--user" "${DB_USERNAME}:${DB_PASSWORD}")

is_boolean_yes "$DB_ENABLE_SECURITY" && command_args+=("-k" "--user" "${DB_USERNAME}:${DB_PASSWORD}")
is_boolean_yes "$DB_ENABLE_REST_TLS" && protocol="https"

# Combination of --silent, --output and --write-out allows us to obtain both the status code and the request body
output=$(mktemp)
command_args+=("-o" "$output" "${protocol}://${host}:${DB_HTTP_PORT_NUMBER}/_cluster/health?local=true")
Expand Down

0 comments on commit 1291c97

Please sign in to comment.