From 213b2f70d2ccd4619126d791d0d177c76580dcf5 Mon Sep 17 00:00:00 2001 From: Andrea Rabbaglietti Date: Tue, 5 Sep 2023 18:52:07 +0200 Subject: [PATCH] [bitnami/opensearch] Fix readiness/liveness probe not working if "restEncryption: false" in values.yaml (#47340) Signed-off-by: Andrea Rabbaglietti --- .../1/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh | 3 ++- .../2/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bitnami/opensearch/1/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh b/bitnami/opensearch/1/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh index ff0bba9258b37..349fb16973631 100644 --- a/bitnami/opensearch/1/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh +++ b/bitnami/opensearch/1/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh @@ -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) diff --git a/bitnami/opensearch/2/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh b/bitnami/opensearch/2/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh index ff0bba9258b37..5cb7a4598f804 100644 --- a/bitnami/opensearch/2/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh +++ b/bitnami/opensearch/2/debian-11/rootfs/opt/bitnami/scripts/libopensearch.sh @@ -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")