Skip to content
Snippets Groups Projects

Make liveness probe only faily 500/503 error codes

Merged Francisco Borges Aurindo Barros requested to merge remove-probe-assumptions into v9.4-2
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -33,7 +33,7 @@
# 302: redirection (NOTE: not sure if there's a legitimate case to expect this)
# 403: fully private websites give this response
# 503: high load
if [[ "${HTTP_CODE_BASE}" -ne "200" && "${HTTP_CODE_BASE}" -ne "302" && "${HTTP_CODE_BASE}" -ne "403" && "${HTTP_CODE_BASE}" -ne "503" ]]; then
if [[ "${HTTP_CODE_BASE}" -eq "500" || "${HTTP_CODE_BASE}" -eq "503" ]]; then
echo "Probe failed" >> $FILE
echo "Probe failed. Endpoint / responds with code: $HTTP_CODE_BASE"
exit 1
Loading