From 1d019f9c4b31093cf1ba7d72654560f0949b4dc7 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 20 Apr 2026 11:29:57 +0000 Subject: [PATCH] fix(k8s): exclude per-deployment file-level host-path binds from mount check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compose volumes like './config/x.sh' are emitted per-deployment with containerPath '/mnt/host-path-' 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) --- stack_orchestrator/deploy/k8s/helpers.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stack_orchestrator/deploy/k8s/helpers.py b/stack_orchestrator/deploy/k8s/helpers.py index 8f3525ef..68cde506 100644 --- a/stack_orchestrator/deploy/k8s/helpers.py +++ b/stack_orchestrator/deploy/k8s/helpers.py @@ -299,9 +299,18 @@ def check_mounts_compatible(cluster_name: str, config_file: str) -> None: file=sys.stderr, ) 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 = [] for m in required: dest = m["containerPath"] + if dest.startswith("/mnt/host-path-"): + continue want = m["hostPath"] have = live.get(dest) if have != want: