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

Commit

Permalink
[kibana] Explicitly test for a 200 for readinessProbe (#291)
Browse files Browse the repository at this point in the history
[kibana] Explicitly test for a 200 for readinessProbe
  • Loading branch information
Crazybus authored Sep 19, 2019
2 parents feaed2b + 59e1372 commit e9e389f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion kibana/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ spec:
set -- "$@" -u "${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}"
fi
curl -k "$@" "{{ .Values.protocol }}://localhost:{{ .Values.httpPort }}${path}"
STATUS=$(curl --output /dev/null --write-out "%{http_code}" -k "$@" "{{ .Values.protocol }}://localhost:{{ .Values.httpPort }}${path}")
if [[ "${STATUS}" -eq 200 ]]; then
exit 0
fi
echo "Error: Got HTTP code ${STATUS} but expected a 200"
exit 1
}
http "{{ .Values.healthCheckPath }}"
Expand Down

0 comments on commit e9e389f

Please sign in to comment.