From acf81846804c3e82d2d6acea7e7db836f803d2e1 Mon Sep 17 00:00:00 2001 From: Story Crater Bot <19826264+Riotpiaole@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:54:14 -0700 Subject: [PATCH] fix(homarr): add proper probes via Kustomize patch Chart version 8.23.0 doesn't support probe customization via values. Using strategic merge patch instead. Probe configuration: - Liveness: 60s initial delay, 30s period, 5s timeout - Readiness: 45s initial delay, 15s period, 5s timeout App initialization timeline: 0-5s: DB migrations, Redis startup 6s: WebSocket server ready 27-30s: Icon cache populated (27k+ icons) 30s+: Analytics cron initialized, fully operational --- .../homarr/deployment-probes-patch.yaml | 28 +++++++++++++++++ k8s/applications/homarr/homarr-values.yaml | 31 +++++-------------- k8s/applications/homarr/kustomization.yaml | 9 ++++-- 3 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 k8s/applications/homarr/deployment-probes-patch.yaml diff --git a/k8s/applications/homarr/deployment-probes-patch.yaml b/k8s/applications/homarr/deployment-probes-patch.yaml new file mode 100644 index 0000000..34e5a43 --- /dev/null +++ b/k8s/applications/homarr/deployment-probes-patch.yaml @@ -0,0 +1,28 @@ +# Patch to add proper liveness/readiness probes to Homarr deployment +# App takes 30-45s to fully initialize (DB migrations, Redis, icon cache) +apiVersion: apps/v1 +kind: Deployment +metadata: + name: homarr + namespace: dashboard +spec: + template: + spec: + containers: + - name: homarr + livenessProbe: + httpGet: + path: /api/health/live + port: 7575 + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 5 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /api/health/ready + port: 7575 + initialDelaySeconds: 45 + periodSeconds: 15 + timeoutSeconds: 5 + failureThreshold: 3 diff --git a/k8s/applications/homarr/homarr-values.yaml b/k8s/applications/homarr/homarr-values.yaml index 680e4c6..43c33c9 100644 --- a/k8s/applications/homarr/homarr-values.yaml +++ b/k8s/applications/homarr/homarr-values.yaml @@ -8,30 +8,13 @@ image: replicaCount: 1 -# Override default probes - chart defaults are too aggressive for startup time -probes: - liveness: - enabled: true - custom: true - spec: - httpGet: - path: /api/health/live - port: 7575 - initialDelaySeconds: 60 # App needs time for migrations + icon fetch - periodSeconds: 30 - timeoutSeconds: 5 - failureThreshold: 3 - readiness: - enabled: true - custom: true - spec: - httpGet: - path: /api/health/ready - port: 7575 - initialDelaySeconds: 45 # Wait for WebSocket + analytics cron - periodSeconds: 15 - timeoutSeconds: 5 - failureThreshold: 3 +# Disable default probes - they kill the container before it finishes startup +# Will add custom probes via Kustomize patch with proper timing +livenessProbe: + enabled: false + +readinessProbe: + enabled: false tolerations: - key: node-role.kubernetes.io/control-plane diff --git a/k8s/applications/homarr/kustomization.yaml b/k8s/applications/homarr/kustomization.yaml index 677fc65..7b26957 100644 --- a/k8s/applications/homarr/kustomization.yaml +++ b/k8s/applications/homarr/kustomization.yaml @@ -3,5 +3,10 @@ kind: Kustomization namespace: dashboard resources: - homarr-secrets.enc.yaml -# Homarr deployed via Helm chart (values in 60-applications.yaml multi-source Application). -# This kustomization just holds the SOPS-encrypted SECRET_ENCRYPTION_KEY. + +# Patch Homarr deployment with proper probe timing +patches: + - path: deployment-probes-patch.yaml + target: + kind: Deployment + name: homarr