Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
[elasticsearch] Add logging when adding password to keystore
Browse files Browse the repository at this point in the history
This adds the same logging that occurs for all of the other keystore
items being added. Useful so that you can be sure that the bootstrap
password is properly being added when `ELASTIC_PASSWORD` is set.
  • Loading branch information
Crazybus committed Oct 4, 2019
1 parent 313ee8c commit 5e3ab70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion elasticsearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ spec:
done
# Add the bootstrap password since otherwise the Elasticsearch entrypoint tries to do this on startup
[ ! -z ${ELASTIC_PASSWORD+x} ] && echo "$ELASTIC_PASSWORD" | elasticsearch-keystore add -x bootstrap.password
if [ ! -z ${ELASTIC_PASSWORD+x} ]; then
echo 'Adding env $ELASTIC_PASSWORD to keystore as key bootstrap.password'
echo "$ELASTIC_PASSWORD" | elasticsearch-keystore add -x bootstrap.password
fi
cp -a /usr/share/elasticsearch/config/elasticsearch.keystore /tmp/keystore/
env: {{ toYaml .Values.extraEnvs | nindent 10 }}
Expand Down

0 comments on commit 5e3ab70

Please sign in to comment.