fix(k8s): exclude per-deployment file-level host-path binds from mount check

Compose volumes like './config/x.sh' are emitted per-deployment with
containerPath '/mnt/host-path-<sanitized>' and source paths scoped to
each deployment's own directory. Two deployments of the same stack will
always clash at those containerPaths regardless of kind-mount-root —
this is a pre-existing SO aliasing behavior for file-level binds,
orthogonal to umbrella compatibility.

Let the mount-compatibility check skip '/mnt/host-path-*' entries so
the positive case (shared umbrella across deployments) doesn't false-
positive. The check still covers the /mnt umbrella itself and named-
volume data mounts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pull/748/head
Prathamesh Musale 2026-04-20 11:29:57 +00:00
parent f1250a3da1
commit 1d019f9c4b
1 changed files with 9 additions and 0 deletions

View File

@ -299,9 +299,18 @@ def check_mounts_compatible(cluster_name: str, config_file: str) -> None:
file=sys.stderr, file=sys.stderr,
) )
return return
# File-level host-path binds (e.g. `./config/x.sh` from compose volumes)
# are emitted per-deployment with containerPath `/mnt/host-path-*` and
# source paths under each deployment's own directory. Two deployments
# of the same stack will always clash here — a pre-existing SO aliasing
# misfeature that's orthogonal to umbrella compatibility. Skip them so
# this check stays focused on the umbrella and named-volume data mounts
# it was designed for.
mismatches = [] mismatches = []
for m in required: for m in required:
dest = m["containerPath"] dest = m["containerPath"]
if dest.startswith("/mnt/host-path-"):
continue
want = m["hostPath"] want = m["hostPath"]
have = live.get(dest) have = live.get(dest)
if have != want: if have != want: