summaryrefslogtreecommitdiff
path: root/f3s/git-server
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/git-server
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/git-server')
-rw-r--r--f3s/git-server/helm-chart/templates/deployment.yaml16
1 files changed, 16 insertions, 0 deletions
diff --git a/f3s/git-server/helm-chart/templates/deployment.yaml b/f3s/git-server/helm-chart/templates/deployment.yaml
index 31ac14b..28733c5 100644
--- a/f3s/git-server/helm-chart/templates/deployment.yaml
+++ b/f3s/git-server/helm-chart/templates/deployment.yaml
@@ -122,6 +122,15 @@ spec:
- containerPort: 22
name: ssh
protocol: TCP
+ livenessProbe:
+ exec:
+ # /repos is the NFS-backed repos subPath; test -d catches stale
+ # NFS file handles (ESTALE) after an NFS server restart.
+ command: ["test", "-d", "/repos"]
+ initialDelaySeconds: 30
+ periodSeconds: 30
+ failureThreshold: 3
+ timeoutSeconds: 5
volumeMounts:
- name: repos
mountPath: /repos
@@ -147,6 +156,13 @@ spec:
# Container 2: CGit Web UI + git-http-backend
- name: cgit
image: joseluisq/alpine-cgit:latest
+ livenessProbe:
+ exec:
+ command: ["test", "-d", "/repos"]
+ initialDelaySeconds: 30
+ periodSeconds: 30
+ failureThreshold: 3
+ timeoutSeconds: 5
command: ["/bin/sh", "-c"]
args:
- |