[bitnami/opensearch] Fix readiness/liveness probe not working if "restEncryption: false" in values.yaml (#47340)

Signed-off-by: Andrea Rabbaglietti <rabbagliettiandrea@gmail.com>
This commit is contained in:
Andrea Rabbaglietti
2023-09-05 18:52:07 +02:00
committed by GitHub
parent e9d5592b9e
commit 213b2f70d2
2 changed files with 5 additions and 3 deletions

View File

@@ -940,7 +940,8 @@ 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)

View File

@@ -940,8 +940,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")