Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions charts/test-guide/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,18 @@ spec:
timeoutSeconds: 5
failureThreshold: 5
readinessProbe:
httpGet:
path: /api/health/ready
port: {{ .Values.service.targetPort }}
exec:
command:
- /bin/sh
- -c
- |
if curl -s http://localhost:{{ .Values.service.targetPort }}{{ .Values.service.readinessPath | default "/api/health/ready" }}; then
exit 0
elif curl -s http://localhost:{{ .Values.service.targetPort }}/api/health/live; then
exit 0
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a more complex solution than I expected. In this implementation it doesn't make much sense, as it would be enough to just check .../live for the same result.

If we want to do a more complex check if test.guide is in maintenance mode, we would need to check for http code 503 and a set Retry-After Header

exit 1
fi
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
Expand Down
Loading