summaryrefslogtreecommitdiff
path: root/f3s/example-apache-volume-claim/helm-chart/templates/apache-deployment.yaml
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-25 23:24:24 +0300
committerPaul Buetow <paul@buetow.org>2026-05-25 23:24:24 +0300
commitd161a7ab3de01e6834cc99db2b1e29cf9f3cf843 (patch)
treee0ba1601e4c8c84c0ec28e4e270a1c92254fe790 /f3s/example-apache-volume-claim/helm-chart/templates/apache-deployment.yaml
parent85dbcf55e51fbaab3719b148d5c5fb7d2586fdc2 (diff)
example-apache-volume-claim: add NFS sentinel initContainer check
Adds the standard nfs-check initContainer to verify the sentinel file exists before the main Apache container starts. Prevents silent fall-back to local XFS when NFS is unmounted on the node.
Diffstat (limited to 'f3s/example-apache-volume-claim/helm-chart/templates/apache-deployment.yaml')
-rw-r--r--f3s/example-apache-volume-claim/helm-chart/templates/apache-deployment.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/f3s/example-apache-volume-claim/helm-chart/templates/apache-deployment.yaml b/f3s/example-apache-volume-claim/helm-chart/templates/apache-deployment.yaml
index 78706a3..a900f07 100644
--- a/f3s/example-apache-volume-claim/helm-chart/templates/apache-deployment.yaml
+++ b/f3s/example-apache-volume-claim/helm-chart/templates/apache-deployment.yaml
@@ -14,6 +14,23 @@ spec:
labels:
app: apache
spec:
+ initContainers:
+ - name: nfs-check-apache-htdocs
+ 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: apache-htdocs
+ mountPath: /mnt
+ readOnly: true
containers:
- name: apache
image: httpd:latest