fix for nfs-photo mergefs start before ganesha
This commit is contained in:
@@ -33,11 +33,21 @@ spec:
|
||||
- sh
|
||||
- -c
|
||||
- cat /proc/self/mounts > /mtab-vol/mtab
|
||||
containers:
|
||||
# mounts the two disks and exposes their union at /disks/merged via FUSE;
|
||||
# bidirectional propagation makes that mount visible to the "app"
|
||||
# (ganesha) container so it can export it over NFS.
|
||||
# native sidecar (restartPolicy: Always): mounts the two disks and
|
||||
# exposes their union at /disks/merged via FUSE. It must be up and
|
||||
# actually mounted *before* the "app" container is created, since
|
||||
# HostToContainer propagation only relays mounts made *after* the
|
||||
# receiving container's own mount exists - it won't retroactively
|
||||
# pick up a FUSE mount that's already there. Running it as a
|
||||
# restartPolicy:Always init container (started, gated on the
|
||||
# startupProbe below, before regular containers) guarantees that
|
||||
# ordering; a regular sidecar container racing "app" on every pod
|
||||
# start does not.
|
||||
mergerfs:
|
||||
dependsOn:
|
||||
- fix-permissions
|
||||
- mtab-setup
|
||||
restartPolicy: Always
|
||||
image:
|
||||
repository: ghcr.io/hotio/mergerfs
|
||||
tag: release-v2.42.0
|
||||
@@ -48,12 +58,26 @@ spec:
|
||||
- "/disks/merged"
|
||||
securityContext:
|
||||
privileged: true
|
||||
probes:
|
||||
startup:
|
||||
enabled: true
|
||||
custom: true
|
||||
spec:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- grep -q fuse.mergerfs /proc/mounts
|
||||
periodSeconds: 1
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 30
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
memory: 512Mi
|
||||
containers:
|
||||
app:
|
||||
image:
|
||||
repository: hectorm/nfs-ganesha
|
||||
|
||||
Reference in New Issue
Block a user