From 120f4cdb7bc0f30adca63745d11f581ba9230cb2 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Tue, 14 Apr 2026 05:49:11 +0000 Subject: [PATCH] Fix ConfigMap k8s object: read from deployment dir, not spec path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit get_configmaps() used the spec's configmap value (a repo-relative source path) joined with the deployment dir, producing a non-existent path. ConfigMap files are copied to {deployment_dir}/configmaps/{name}/ by deploy create — read from there instead. Co-Authored-By: Claude Opus 4.6 (1M context) --- stack_orchestrator/deploy/k8s/cluster_info.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stack_orchestrator/deploy/k8s/cluster_info.py b/stack_orchestrator/deploy/k8s/cluster_info.py index d2fd396a..88cb2a21 100644 --- a/stack_orchestrator/deploy/k8s/cluster_info.py +++ b/stack_orchestrator/deploy/k8s/cluster_info.py @@ -392,11 +392,17 @@ class ClusterInfo: print(f"{cfg_map_name} not in pod files") continue - cfg_map_path = os.path.expanduser(cfg_map_path) - if not cfg_map_path.startswith("/") and self.spec.file_path is not None: + # ConfigMap files live in {deployment_dir}/configmaps/{name}/, + # copied there by deploy create / restart from the source path + # specified in the spec. + if self.spec.file_path is not None: cfg_map_path = os.path.join( - os.path.dirname(str(self.spec.file_path)), cfg_map_path + os.path.dirname(str(self.spec.file_path)), + "configmaps", + cfg_map_name, ) + else: + cfg_map_path = os.path.expanduser(cfg_map_path) # Read in all the files at a single-level of the directory. # This mimics the behavior of