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

Commit

Permalink
Merge pull request #380 from fatmcgav/tweak_es_readiness_command
Browse files Browse the repository at this point in the history
[elasticsearch] Tweak the 'readinessProbe' command to verify that master nodes are available.
  • Loading branch information
Gavin Williams authored Nov 21, 2019
2 parents aa5394a + 7af11b1 commit f2c8815
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elasticsearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ spec:
}
if [ -f "${START_FILE}" ]; then
echo 'Elasticsearch is already running, lets check the node is healthy'
http "/"
echo 'Elasticsearch is already running, lets check the node is healthy and there are master nodes available'
http "/_cluster/health?timeout=0s"
else
echo 'Waiting for elasticsearch cluster to become cluster to be ready (request params: "{{ .Values.clusterHealthCheckParams }}" )'
if http "/_cluster/health?{{ .Values.clusterHealthCheckParams }}" ; then
Expand Down
1 change: 1 addition & 0 deletions elasticsearch/tests/elasticsearch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def test_defaults():

assert 'curl' in c['readinessProbe']['exec']['command'][-1]
assert 'http://127.0.0.1:9200' in c['readinessProbe']['exec']['command'][-1]
assert '/_cluster/health?timeout=0s' in c['readinessProbe']['exec']['command'][-1]

# Resources
assert c['resources'] == {
Expand Down

0 comments on commit f2c8815

Please sign in to comment.