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