Merge "Add Elasticsearch liveness/readiness probes"

This commit is contained in:
Zuul 2017-12-12 20:20:31 +00:00 committed by Gerrit Code Review
commit 1c66ca1c12
4 changed files with 21 additions and 4 deletions

View File

@ -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;

View File

@ -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:

View File

@ -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:

View File

@ -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: