From 929bdab8a421a96f0ef3bb4db6ad0b8a5cfea383 Mon Sep 17 00:00:00 2001 From: "A. F. Dudley" Date: Sat, 7 Mar 2026 12:58:04 +0000 Subject: [PATCH] fix(k8s): add HostToContainer mount propagation to kind-mount-root The kind-mount-root extraMount entry used kind's default propagation (None), so new bind mounts under the root on the host (e.g. zvols mounted under /srv/kind) were not visible inside the kind node until restart. Setting propagation to HostToContainer makes host-side mount changes propagate into the kind node automatically. Co-Authored-By: Claude Opus 4.6 --- stack_orchestrator/deploy/k8s/helpers.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/stack_orchestrator/deploy/k8s/helpers.py b/stack_orchestrator/deploy/k8s/helpers.py index 95e53d73..ec136233 100644 --- a/stack_orchestrator/deploy/k8s/helpers.py +++ b/stack_orchestrator/deploy/k8s/helpers.py @@ -440,8 +440,11 @@ def named_volumes_from_pod_files(parsed_pod_files): return named_volumes -def get_kind_pv_bind_mount_path(volume_name: str, kind_mount_root: Optional[str] = None, - host_path: Optional[str] = None): +def get_kind_pv_bind_mount_path( + volume_name: str, + kind_mount_root: Optional[str] = None, + host_path: Optional[str] = None, +): if kind_mount_root and host_path and host_path.startswith(kind_mount_root): rel = os.path.relpath(host_path, kind_mount_root) return f"/mnt/{rel}" @@ -596,6 +599,7 @@ def _generate_kind_mounts(parsed_pod_files, deployment_dir, deployment_context): volume_definitions.append( f" - hostPath: {kind_mount_root}\n" f" containerPath: /mnt\n" + f" propagation: HostToContainer\n" ) mount_root_emitted = True @@ -658,8 +662,10 @@ def _generate_kind_mounts(parsed_pod_files, deployment_dir, deployment_context): volume_host_path_map[volume_name], deployment_dir, ) - # Skip individual extraMount if covered by mount root - if mount_root_emitted and str(host_path).startswith(kind_mount_root): + # Skip if covered by mount root + if mount_root_emitted and str(host_path).startswith( + kind_mount_root + ): continue container_path = get_kind_pv_bind_mount_path( volume_name