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

[elasticsearch] Tweak the 'readinessProbe' command to verify that master nodes are available. #380

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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