Add Elasticsearch liveness/readiness probes
The elasticsearch tests fail because the pods don't have readiness or liveliness probes in the templates. This adds those definitions Change-Id: I4fd25aec5ae02d89ae1b933d8b083a3e9cafc55a
This commit is contained in:
parent
4b94e47c94
commit
bea44e53bf
@ -31,7 +31,7 @@ function create_index () {
|
|||||||
' | python -c "import sys, json; print json.load(sys.stdin)['acknowledged']")
|
' | python -c "import sys, json; print json.load(sys.stdin)['acknowledged']")
|
||||||
if [ "$index_result" == "True" ];
|
if [ "$index_result" == "True" ];
|
||||||
then
|
then
|
||||||
echo "PASS: Test index created!"
|
echo "PASS: Test index created!";
|
||||||
else
|
else
|
||||||
echo "FAIL: Test index not created!";
|
echo "FAIL: Test index not created!";
|
||||||
exit 1;
|
exit 1;
|
||||||
@ -47,7 +47,7 @@ function insert_test_data () {
|
|||||||
' | python -c "import sys, json; print json.load(sys.stdin)['created']")
|
' | python -c "import sys, json; print json.load(sys.stdin)['created']")
|
||||||
if [ "$insert_result" == "True" ]; then
|
if [ "$insert_result" == "True" ]; then
|
||||||
sleep 20
|
sleep 20
|
||||||
echo "PASS: Test data inserted into test index!"
|
echo "PASS: Test data inserted into test index!";
|
||||||
else
|
else
|
||||||
echo "FAIL: Test data not inserted into test index!";
|
echo "FAIL: Test data not inserted into test index!";
|
||||||
exit 1;
|
exit 1;
|
||||||
|
@ -76,6 +76,15 @@ spec:
|
|||||||
containerPort: {{ .Values.network.client.port }}
|
containerPort: {{ .Values.network.client.port }}
|
||||||
- name: transport
|
- name: transport
|
||||||
containerPort: {{ .Values.network.discovery.port }}
|
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:
|
env:
|
||||||
- name: NAMESPACE
|
- name: NAMESPACE
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -72,10 +72,13 @@ spec:
|
|||||||
- /tmp/elasticsearch.sh
|
- /tmp/elasticsearch.sh
|
||||||
- stop
|
- stop
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
|
||||||
containerPort: {{ .Values.network.client.port }}
|
|
||||||
- name: transport
|
- name: transport
|
||||||
containerPort: {{ .Values.network.discovery.port }}
|
containerPort: {{ .Values.network.discovery.port }}
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.network.discovery.port }}
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 10
|
||||||
env:
|
env:
|
||||||
- name: NAMESPACE
|
- name: NAMESPACE
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -71,6 +71,11 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- name: transport
|
- name: transport
|
||||||
containerPort: {{ .Values.network.data.port }}
|
containerPort: {{ .Values.network.data.port }}
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.network.discovery.port }}
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 10
|
||||||
env:
|
env:
|
||||||
- name: NAMESPACE
|
- name: NAMESPACE
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
Loading…
Reference in New Issue
Block a user