From 29355b74a5e13b97e0a5a061690d979fe2e88c70 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Wed, 31 Jan 2024 21:04:26 +0000 Subject: [PATCH] Don't include volumes in spec if we don't have any. --- stack_orchestrator/deploy/deployment_create.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stack_orchestrator/deploy/deployment_create.py b/stack_orchestrator/deploy/deployment_create.py index b95386b1..b72f262c 100644 --- a/stack_orchestrator/deploy/deployment_create.py +++ b/stack_orchestrator/deploy/deployment_create.py @@ -365,7 +365,8 @@ def init_operation(deploy_command_context, stack, deployer_type, config, configmap_descriptors[named_volume] = f"./data/{named_volume}" else: volume_descriptors[named_volume] = f"./data/{named_volume}" - spec_file_content["volumes"] = volume_descriptors + if volume_descriptors: + spec_file_content["volumes"] = volume_descriptors if configmap_descriptors: spec_file_content["configmaps"] = configmap_descriptors -- 2.45.2