diff --git a/elasticsearch/templates/bin/_helm-tests.sh.tpl b/elasticsearch/templates/bin/_helm-tests.sh.tpl index 8e0d8244b..94f776a3c 100644 --- a/elasticsearch/templates/bin/_helm-tests.sh.tpl +++ b/elasticsearch/templates/bin/_helm-tests.sh.tpl @@ -31,7 +31,7 @@ function create_index () { ' | python -c "import sys, json; print json.load(sys.stdin)['acknowledged']") if [ "$index_result" == "True" ]; then - echo "PASS: Test index created!" + echo "PASS: Test index created!"; else echo "FAIL: Test index not created!"; exit 1; @@ -47,7 +47,7 @@ function insert_test_data () { ' | python -c "import sys, json; print json.load(sys.stdin)['created']") if [ "$insert_result" == "True" ]; then sleep 20 - echo "PASS: Test data inserted into test index!" + echo "PASS: Test data inserted into test index!"; else echo "FAIL: Test data not inserted into test index!"; exit 1; diff --git a/elasticsearch/templates/deployment-client.yaml b/elasticsearch/templates/deployment-client.yaml index 9380ff485..ce6782e63 100644 --- a/elasticsearch/templates/deployment-client.yaml +++ b/elasticsearch/templates/deployment-client.yaml @@ -76,6 +76,15 @@ spec: containerPort: {{ .Values.network.client.port }} - name: transport containerPort: {{ .Values.network.discovery.port }} + livenessProbe: + tcpSocket: + port: {{ .Values.network.discovery.port }} + initialDelaySeconds: 20 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /_cluster/health + port: {{ .Values.network.client.port }} env: - name: NAMESPACE valueFrom: diff --git a/elasticsearch/templates/deployment-master.yaml b/elasticsearch/templates/deployment-master.yaml index e55847119..b52c1ae0f 100644 --- a/elasticsearch/templates/deployment-master.yaml +++ b/elasticsearch/templates/deployment-master.yaml @@ -72,10 +72,13 @@ spec: - /tmp/elasticsearch.sh - stop ports: - - name: http - containerPort: {{ .Values.network.client.port }} - name: transport containerPort: {{ .Values.network.discovery.port }} + livenessProbe: + tcpSocket: + port: {{ .Values.network.discovery.port }} + initialDelaySeconds: 20 + periodSeconds: 10 env: - name: NAMESPACE valueFrom: diff --git a/elasticsearch/templates/statefulset-data.yaml b/elasticsearch/templates/statefulset-data.yaml index d23d5929d..172f48deb 100644 --- a/elasticsearch/templates/statefulset-data.yaml +++ b/elasticsearch/templates/statefulset-data.yaml @@ -71,6 +71,11 @@ spec: ports: - name: transport containerPort: {{ .Values.network.data.port }} + livenessProbe: + tcpSocket: + port: {{ .Values.network.discovery.port }} + initialDelaySeconds: 20 + periodSeconds: 10 env: - name: NAMESPACE valueFrom: