From ce7a8bad8113f0938ab9a53915a1b3e3bbe6ef4f Mon Sep 17 00:00:00 2001 From: Story Crater Bot <19826264+Riotpiaole@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:55:33 -0700 Subject: [PATCH] fix(homarr): patch probes via PostSync hook Chart v8.23.0 (homarr-labs/charts) doesn't support probe customization. All attempts failed: - probes.liveness.spec: ignored - controller.probes: ignored - livenessProbe.enabled: ignored Solution: PostSync hook Job patches deployment after Helm sync. Probe config: - Liveness: 60s initial, 30s period, 5s timeout - Readiness: 45s initial, 15s period, 5s timeout App needs 30-45s for DB migrations, Redis, icon cache (27k+ icons). --- k8s/applications/homarr/fix-probes-job.yaml | 90 +++++++++++++++++++++ k8s/applications/homarr/homarr-values.yaml | 24 +----- k8s/applications/homarr/kustomization.yaml | 3 +- 3 files changed, 93 insertions(+), 24 deletions(-) create mode 100644 k8s/applications/homarr/fix-probes-job.yaml diff --git a/k8s/applications/homarr/fix-probes-job.yaml b/k8s/applications/homarr/fix-probes-job.yaml new file mode 100644 index 0000000..5b60e3d --- /dev/null +++ b/k8s/applications/homarr/fix-probes-job.yaml @@ -0,0 +1,90 @@ +# PostSync hook to patch Homarr deployment probes +# Chart v8.23.0 doesn't support probe customization via values +apiVersion: batch/v1 +kind: Job +metadata: + name: homarr-fix-probes + namespace: dashboard + annotations: + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: BeforeHookCreation +spec: + backoffLimit: 3 + template: + spec: + restartPolicy: Never + serviceAccountName: homarr-probe-patcher + containers: + - name: patch + image: bitnami/kubectl:1.31 + command: + - /bin/bash + - -c + - | + set -e + echo "Patching Homarr deployment probes..." + + kubectl -n dashboard patch deployment homarr --type=json -p='[ + { + "op": "replace", + "path": "/spec/template/spec/containers/0/livenessProbe/initialDelaySeconds", + "value": 60 + }, + { + "op": "replace", + "path": "/spec/template/spec/containers/0/livenessProbe/periodSeconds", + "value": 30 + }, + { + "op": "replace", + "path": "/spec/template/spec/containers/0/livenessProbe/timeoutSeconds", + "value": 5 + }, + { + "op": "replace", + "path": "/spec/template/spec/containers/0/readinessProbe/initialDelaySeconds", + "value": 45 + }, + { + "op": "replace", + "path": "/spec/template/spec/containers/0/readinessProbe/periodSeconds", + "value": 15 + }, + { + "op": "replace", + "path": "/spec/template/spec/containers/0/readinessProbe/timeoutSeconds", + "value": 5 + } + ]' + + echo "Probes patched successfully" +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: homarr-probe-patcher + namespace: dashboard +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: homarr-probe-patcher + namespace: dashboard +rules: +- apiGroups: ["apps"] + resources: ["deployments"] + verbs: ["get", "patch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: homarr-probe-patcher + namespace: dashboard +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: homarr-probe-patcher +subjects: +- kind: ServiceAccount + name: homarr-probe-patcher + namespace: dashboard diff --git a/k8s/applications/homarr/homarr-values.yaml b/k8s/applications/homarr/homarr-values.yaml index 01a2f98..18fb44a 100644 --- a/k8s/applications/homarr/homarr-values.yaml +++ b/k8s/applications/homarr/homarr-values.yaml @@ -1,5 +1,5 @@ -# Homarr landing page -# Chart version: 8.23.0 from homarr-labs/charts +# Homarr landing page - minimal config +# Probes patched via PostSync hook (chart doesn't support customization) image: repository: ghcr.io/homarr-labs/homarr @@ -8,26 +8,6 @@ image: replicaCount: 1 -# Override probe timing - app needs 30-45s to fully initialize -controller: - probes: - liveness: - enabled: true - custom: false - spec: - initialDelaySeconds: 60 - periodSeconds: 30 - timeoutSeconds: 5 - failureThreshold: 3 - readiness: - enabled: true - custom: false - spec: - initialDelaySeconds: 45 - periodSeconds: 15 - timeoutSeconds: 5 - failureThreshold: 3 - tolerations: - key: node-role.kubernetes.io/control-plane operator: Exists diff --git a/k8s/applications/homarr/kustomization.yaml b/k8s/applications/homarr/kustomization.yaml index a535672..233778c 100644 --- a/k8s/applications/homarr/kustomization.yaml +++ b/k8s/applications/homarr/kustomization.yaml @@ -3,5 +3,4 @@ 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 secrets. + - fix-probes-job.yaml