diff --git a/kube/base-components/elasticsearch-deployment.yaml b/kube/base-components/elasticsearch-deployment.yaml index 9539e05..b4bb176 100644 --- a/kube/base-components/elasticsearch-deployment.yaml +++ b/kube/base-components/elasticsearch-deployment.yaml @@ -76,13 +76,9 @@ spec: lifecycle: postStart: exec: - command: - - "sh" - - "-c" - - | - echo ${S3_CLIENT_ACCESS_KEY} | /usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.default.access_key --stdin - echo ${S3_CLIENT_SECRET_KEY} | /usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.default.secret_key --stdin - /usr/share/elasticsearch/bin/elasticsearch-plugin list | grep -q repository-s3 || /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch repository-s3 + command: ["/bin/bash", "-c", "/usr/share/elasticsearch/bin/elasticsearch-plugin list | grep -q repository-s3 || /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch repository-s3 && \ + echo ${S3_CLIENT_ACCESS_KEY} | /usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.default.access_key --stdin &&\ + echo ${S3_CLIENT_SECRET_KEY} | /usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.default.secret_key --stdin"] volumes: - name: es-data persistentVolumeClaim: