If a directory exists under config/ which matches the name of a configmap, copy it during create.
Some checks failed
Lint Checks / Run linter (pull_request) Failing after 32s
Smoke Test / Run basic test suite (pull_request) Successful in 4m3s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m39s
Deploy Test / Run deploy test suite (pull_request) Successful in 4m44s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 7m31s

This commit is contained in:
Thomas E Lackey 2024-08-08 16:37:46 -05:00
parent 46943d41a8
commit 21c61f9207
2 changed files with 11 additions and 1 deletions

View File

@ -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.

View File

@ -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: