summaryrefslogtreecommitdiff
path: root/f3s/webdav/helm-chart/templates
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-20 23:52:01 +0300
committerPaul Buetow <paul@buetow.org>2026-06-20 23:52:01 +0300
commit6e8ec18949dc41e611a38d8204211b2deb9a944b (patch)
tree90519f48ee53b3c677234727feb31d56bbd875f8 /f3s/webdav/helm-chart/templates
parentc9f06a21fb1daa74c9db341636a2c4b118bda1d8 (diff)
k8s: add NFS-aware liveness probes to all NFS-backed deployments
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 <noreply@anthropic.com>
Diffstat (limited to 'f3s/webdav/helm-chart/templates')
-rw-r--r--f3s/webdav/helm-chart/templates/deployment.yaml23
1 files changed, 23 insertions, 0 deletions
diff --git a/f3s/webdav/helm-chart/templates/deployment.yaml b/f3s/webdav/helm-chart/templates/deployment.yaml
index d528ce2..96ca24a 100644
--- a/f3s/webdav/helm-chart/templates/deployment.yaml
+++ b/f3s/webdav/helm-chart/templates/deployment.yaml
@@ -18,6 +18,22 @@ spec:
seLinuxOptions:
type: spc_t
initContainers:
+ - name: nfs-check-data
+ image: busybox:stable
+ command:
+ - sh
+ - -c
+ - |
+ test -f /mnt/.nfs-sentinel || (
+ echo "ERROR: NFS sentinel missing at /mnt/.nfs-sentinel"
+ echo "refusing to start; node likely has NFS unmounted"
+ echo "pod would otherwise bind-mount the local-XFS shadow"
+ exit 1
+ )
+ volumeMounts:
+ - name: webdav-data
+ mountPath: /mnt
+ readOnly: true
- name: setup
image: httpd:2.4
command:
@@ -47,6 +63,13 @@ spec:
runAsGroup: 65534
ports:
- containerPort: 8080
+ livenessProbe:
+ exec:
+ command: ["test", "-f", "/var/www/webdav/.nfs-sentinel"]
+ initialDelaySeconds: 30
+ periodSeconds: 30
+ failureThreshold: 3
+ timeoutSeconds: 5
volumeMounts:
- name: webdav-data
mountPath: /var/www/webdav