From 899e2aed2ab582960215422e08e11bca186c6341 Mon Sep 17 00:00:00 2001 From: rock Date: Sun, 13 Sep 2026 06:02:28 +0900 Subject: [PATCH] fix: authentik probe timeouts blocking DB migration on fresh cluster Liveness probe was firing after 60s with failureThreshold:6, killing the server container before it finished applying 200+ DB migrations. The startup probe (20min timeout) never got a chance to complete. Root cause: Authentik health checks fail during long DB bootstrap. Both liveness and startup probes run in parallel. Liveness killed the pod at 60s; migrations need 2-3min minimum. Solution: Add initialDelaySeconds:300 to liveness/readiness probes so they don't fire until 5min have passed (migrations definitely complete). Worker gets same treatment since it depends on server's DB bootstrap. --- k8s/infra/iam/authentik-values.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/k8s/infra/iam/authentik-values.yaml b/k8s/infra/iam/authentik-values.yaml index 37c1324..663c92b 100644 --- a/k8s/infra/iam/authentik-values.yaml +++ b/k8s/infra/iam/authentik-values.yaml @@ -153,9 +153,11 @@ server: # checks aren't treated as failures. (Only these fields are overridden; the # chart deep-merges the rest of each probe, incl. the httpGet path.) livenessProbe: + initialDelaySeconds: 300 # skip probe until 5min passed (migrations finish) timeoutSeconds: 15 failureThreshold: 6 readinessProbe: + initialDelaySeconds: 300 # skip probe until migrations complete timeoutSeconds: 15 failureThreshold: 6 startupProbe: @@ -215,6 +217,13 @@ worker: podAnnotations: configmap.reloader.stakater.com/reload: "homelab-ca" homelab.io/restart-at: "2026-06-21T13-40" + livenessProbe: + initialDelaySeconds: 300 # skip probe until 5min passed (migrations finish) + readinessProbe: + initialDelaySeconds: 300 # skip probe until migrations complete + startupProbe: + initialDelaySeconds: 30 # let server finish DB work first + failureThreshold: 120 metrics: enabled: true serviceMonitor: