Add health probes to Dozzle container to fix startup race condition

Fixes DEV-350. During pod startup, Dozzle takes ~11 seconds to start
accepting connections, but oauth2-proxy can receive and proxy requests
immediately. This causes "connection refused" errors when users access
the UI right after a pod restart.

Solution:
- Add startupProbe with 30s timeout (15 failures × 2s) to give Dozzle
  time to start without failing readiness
- Add readinessProbe to prevent traffic routing until Dozzle is ready
- Add livenessProbe to restart container if Dozzle becomes unhealthy

All probes use the /healthcheck endpoint on port 8080.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
CTO Agent 2026-07-19 14:59:35 +00:00
parent 7c11256739
commit 5797b106a6

View file

@ -38,6 +38,31 @@ spec:
value: "X-Forwarded-Preferred-Username" value: "X-Forwarded-Preferred-Username"
- name: DOZZLE_NO_ANALYTICS - name: DOZZLE_NO_ANALYTICS
value: "true" value: "true"
startupProbe:
httpGet:
path: /healthcheck
port: 8080
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 15
readinessProbe:
httpGet:
path: /healthcheck
port: 8080
periodSeconds: 5
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 2
livenessProbe:
httpGet:
path: /healthcheck
port: 8080
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3
volumeMounts: volumeMounts:
- name: dozzle-data - name: dozzle-data
mountPath: /data mountPath: /data