From 6e8ec18949dc41e611a38d8204211b2deb9a944b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 20 Jun 2026 23:52:01 +0300 Subject: k8s: add NFS-aware liveness probes to all NFS-backed deployments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All hostPath PVs are backed by NFS (127.0.0.1:/k3svolumes via stunnel). Existing NFS sentinel init containers only protect against pod startup when NFS is unmounted. If NFS goes stale mid-flight (e.g. after an NFS server restart during FreeBSD upgrades), running pods hold stale file descriptors and serve errors indefinitely without being restarted. Fix: add livenessProbe to every NFS-backed container: - Non-postgres services: test -f /mount-path/.nfs-sentinel (ESTALE fails this) - Postgres (immich, miniflux): pg_isready AND test -f on pg_filenode.map so the probe exercises both the TCP listener and the NFS data directory - webdav: also adds missing nfs-check-data init container (was the only service without sentinel protection at startup) - git-server (two containers): test -d /repos (sentinel is in PVC root, not the repos subPath, so directory existence check is used instead) All probes: initialDelaySeconds 30 (60 for jellyfin/postgres), periodSeconds 30, failureThreshold 3 — triggers restart after ~90 s of NFS unavailability. Co-Authored-By: Claude Sonnet 4.6 --- f3s/keybr/helm-chart/templates/deployment.yaml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'f3s/keybr/helm-chart') diff --git a/f3s/keybr/helm-chart/templates/deployment.yaml b/f3s/keybr/helm-chart/templates/deployment.yaml index e114a57..bd6adec 100644 --- a/f3s/keybr/helm-chart/templates/deployment.yaml +++ b/f3s/keybr/helm-chart/templates/deployment.yaml @@ -45,6 +45,13 @@ spec: allowPrivilegeEscalation: false ports: - containerPort: 3000 + livenessProbe: + exec: + command: ["test", "-f", "/data/.nfs-sentinel"] + initialDelaySeconds: 30 + periodSeconds: 30 + failureThreshold: 3 + timeoutSeconds: 5 env: - name: APP_URL value: "http://keybr.f3s.buetow.org/" -- cgit v1.2.3