From 8aac178b4b7712c56dda71607909b0c7dc62b348 Mon Sep 17 00:00:00 2001 From: Andrea Rabbaglietti Date: Mon, 4 Sep 2023 21:03:59 +0200 Subject: [PATCH] [bitnami/elasticsearch] Fix readiness/liveness probe not working if "restEncryption: false" in values.yaml Signed-off-by: Andrea Rabbaglietti --- .../debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh | 5 +++-- .../debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bitnami/elasticsearch/7/debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh b/bitnami/elasticsearch/7/debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh index ac4bf7d3d1fd0..4fa8c91182de3 100644 --- a/bitnami/elasticsearch/7/debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh +++ b/bitnami/elasticsearch/7/debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh @@ -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") diff --git a/bitnami/elasticsearch/8/debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh b/bitnami/elasticsearch/8/debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh index ac4bf7d3d1fd0..4fa8c91182de3 100644 --- a/bitnami/elasticsearch/8/debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh +++ b/bitnami/elasticsearch/8/debian-11/rootfs/opt/bitnami/scripts/libelasticsearch.sh @@ -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")