diff --git a/stack_orchestrator/deploy/deployment_create.py b/stack_orchestrator/deploy/deployment_create.py index bdc061d5..64cb33c2 100644 --- a/stack_orchestrator/deploy/deployment_create.py +++ b/stack_orchestrator/deploy/deployment_create.py @@ -514,6 +514,14 @@ def create_operation(deployment_command_context, spec_file, deployment_dir, netw os.mkdir(destination_script_dir) script_paths = get_pod_script_paths(parsed_stack, pod) _copy_files_to_directory(script_paths, destination_script_dir) + if parsed_spec.is_kubernetes_deployment(): + for configmap in parsed_spec.get_configmaps(): + source_config_dir = resolve_config_dir(stack_name, configmap) + if os.path.exists(source_config_dir): + destination_config_dir = deployment_dir_path.joinpath("configmaps", configmap) + print(source_config_dir, destination_config_dir) + copytree(source_config_dir, destination_config_dir, dirs_exist_ok=True) + # Delegate to the stack's Python code # The deploy create command doesn't require a --stack argument so we need to insert the # stack member here. diff --git a/stack_orchestrator/deploy/k8s/cluster_info.py b/stack_orchestrator/deploy/k8s/cluster_info.py index 1e17d5cc..5b207497 100644 --- a/stack_orchestrator/deploy/k8s/cluster_info.py +++ b/stack_orchestrator/deploy/k8s/cluster_info.py @@ -90,7 +90,9 @@ class ClusterInfo: if opts.o.debug: print(f"service port: {raw_port}") if ":" in raw_port: - parts = raw_port.split(":", 2) + parts = raw_port.split(":") + if len(parts) != 2: + raise Error(f"Invalid port definition: {raw_port}") node_port = int(parts[0]) pod_port = int(parts[1]) else: