From 408e0ea592a29b6db95139921c63327b8b94dfff Mon Sep 17 00:00:00 2001 From: jmlrt <8582351+jmlrt@users.noreply.github.com> Date: Mon, 13 Dec 2021 10:45:49 +0100 Subject: [PATCH] [elasticsearch] use bash for keystore init container This commit is a follow up of 167278e2 and is updating the keystore initContainer to also use bash instead of sh. This is required for Elasticsearch > 7.16.0 because the Docker image is now based on Ubuntu instead of CentOS 8, and sh on Ubuntu isn't compatible with the `if [[... -eq ... ]]` statements. --- elasticsearch/templates/statefulset.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml index 6d1487281..afcaccdfe 100644 --- a/elasticsearch/templates/statefulset.yaml +++ b/elasticsearch/templates/statefulset.yaml @@ -175,10 +175,9 @@ spec: image: "{{ .Values.image }}:{{ .Values.imageTag }}" imagePullPolicy: "{{ .Values.imagePullPolicy }}" command: - - sh + - bash - -c - | - #!/usr/bin/env bash set -euo pipefail elasticsearch-keystore create @@ -230,7 +229,7 @@ spec: - bash - -c - | - #!/usr/bin/env bash -e + #!set -e # Exit if ELASTIC_PASSWORD in unset if [ -z "${ELASTIC_PASSWORD}" ]; then