From bb4414551099e91ad71e9ed04f35f93bde5e4361 Mon Sep 17 00:00:00 2001 From: "A. F. Dudley" Date: Sun, 25 Jan 2026 17:27:51 -0500 Subject: [PATCH] fix(deploy): merge volumes from stack init() instead of overwriting Previously, volumes defined in a stack's commands.py init() function were being overwritten by volumes discovered from compose files. This prevented stacks from adding infrastructure volumes like caddy-data that aren't defined in the compose files. Now volumes are merged, with init() volumes taking precedence over compose-discovered defaults. Co-Authored-By: Claude Opus 4.5 --- stack_orchestrator/deploy/deployment_create.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stack_orchestrator/deploy/deployment_create.py b/stack_orchestrator/deploy/deployment_create.py index 601f6c77..6b049fda 100644 --- a/stack_orchestrator/deploy/deployment_create.py +++ b/stack_orchestrator/deploy/deployment_create.py @@ -465,7 +465,10 @@ def init_operation( else: volume_descriptors[named_volume] = f"./data/{named_volume}" if volume_descriptors: - spec_file_content["volumes"] = volume_descriptors + # Merge with existing volumes from stack init() + # init() volumes take precedence over compose defaults + orig_volumes = spec_file_content.get("volumes", {}) + spec_file_content["volumes"] = {**volume_descriptors, **orig_volumes} if configmap_descriptors: spec_file_content["configmaps"] = configmap_descriptors