From 1e645bace3664788538bfbc0ff70b8008088bc81 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Mon, 13 Dec 2021 11:29:28 +0100 Subject: [PATCH] [elasticsearch] use bash for keystore init container (#1464) 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 3db21ec3d..21741ce45 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 # If the node is starting up wait for the cluster to be ready (request params: "{{ .Values.clusterHealthCheckParams }}" ) # Once it has started only check that the node itself is responding START_FILE=/tmp/.es_start_file