Fix deployment name extraction from path
When stack: field in spec.yml contains a path (e.g., stack_orchestrator/data/stacks/name), extract just the final name component for K8s secret naming. K8s resource names must be valid RFC 1123 subdomains and cannot contain slashes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>fix-down-cleanup-by-label
parent
a75138093b
commit
3bc7832d8c
|
|
@ -843,7 +843,8 @@ def _write_deployment_files(
|
||||||
|
|
||||||
# Copy any config variables from the spec file into an env file suitable for compose
|
# Copy any config variables from the spec file into an env file suitable for compose
|
||||||
# Use stack_name as deployment_name for K8s secret naming
|
# Use stack_name as deployment_name for K8s secret naming
|
||||||
deployment_name = stack_name.replace("_", "-")
|
# Extract just the name part if stack_name is a path ("path/to/stack" -> "stack")
|
||||||
|
deployment_name = Path(stack_name).name.replace("_", "-")
|
||||||
_write_config_file(
|
_write_config_file(
|
||||||
spec_file, target_dir.joinpath(constants.config_file_name), deployment_name
|
spec_file, target_dir.joinpath(constants.config_file_name), deployment_name
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue