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']")
|
||||
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;
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user