From 7ef89616f9aad271be0c62eef2b512fe58d22c6b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 25 May 2026 22:29:45 +0300 Subject: Add NFS sentinel initContainers to filebrowser chart for r5 --- .../helm-chart/templates/deployment.yaml | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/f3s/filebrowser/helm-chart/templates/deployment.yaml b/f3s/filebrowser/helm-chart/templates/deployment.yaml index 0d18d34..b3bb4bb 100644 --- a/f3s/filebrowser/helm-chart/templates/deployment.yaml +++ b/f3s/filebrowser/helm-chart/templates/deployment.yaml @@ -17,6 +17,55 @@ spec: labels: app: filebrowser spec: + 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: filebrowser-data + mountPath: /mnt + readOnly: true + - name: nfs-check-database + 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: filebrowser-database + mountPath: /mnt + readOnly: true + - name: nfs-check-config + 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: filebrowser-config + mountPath: /mnt + readOnly: true securityContext: runAsUser: 65534 runAsGroup: 65534 -- cgit v1.2.3