fix for nfs-photo mergefs start before ganesha
This commit is contained in:
@@ -33,11 +33,21 @@ spec:
|
|||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- cat /proc/self/mounts > /mtab-vol/mtab
|
- cat /proc/self/mounts > /mtab-vol/mtab
|
||||||
containers:
|
# native sidecar (restartPolicy: Always): mounts the two disks and
|
||||||
# mounts the two disks and exposes their union at /disks/merged via FUSE;
|
# exposes their union at /disks/merged via FUSE. It must be up and
|
||||||
# bidirectional propagation makes that mount visible to the "app"
|
# actually mounted *before* the "app" container is created, since
|
||||||
# (ganesha) container so it can export it over NFS.
|
# 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:
|
mergerfs:
|
||||||
|
dependsOn:
|
||||||
|
- fix-permissions
|
||||||
|
- mtab-setup
|
||||||
|
restartPolicy: Always
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/hotio/mergerfs
|
repository: ghcr.io/hotio/mergerfs
|
||||||
tag: release-v2.42.0
|
tag: release-v2.42.0
|
||||||
@@ -48,12 +58,26 @@ spec:
|
|||||||
- "/disks/merged"
|
- "/disks/merged"
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
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:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 50m
|
cpu: 50m
|
||||||
memory: 64Mi
|
memory: 64Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
|
containers:
|
||||||
app:
|
app:
|
||||||
image:
|
image:
|
||||||
repository: hectorm/nfs-ganesha
|
repository: hectorm/nfs-ganesha
|
||||||
|
|||||||
Reference in New Issue
Block a user