Fix configmap source path: use spec value directly as repo-relative
The spec's configmap path (e.g. "stack-orchestrator/compose/maintenance") is already relative to the repo root. Prepending the stack root caused a doubled prefix (stack-orchestrator/stack-orchestrator/...) and the source directory was never found. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>pull/741/head
parent
0bdba4e822
commit
0d4a4e19f5
|
|
@ -1118,8 +1118,12 @@ def _write_deployment_files(
|
||||||
# (user-defined in spec.yml). Fall back to the config/ dir
|
# (user-defined in spec.yml). Fall back to the config/ dir
|
||||||
# convention if no value is provided.
|
# convention if no value is provided.
|
||||||
if configmap_path and not str(configmap_path).startswith("./"):
|
if configmap_path and not str(configmap_path).startswith("./"):
|
||||||
stack_root = Path(get_stack_path(stack_name)).parent.parent
|
# configmap_path is relative to the repo root (cwd during
|
||||||
source_config_dir = stack_root / configmap_path
|
# restart). get_stack_path gives us a path like
|
||||||
|
# "stack-orchestrator/stacks/dumpster" — also relative to
|
||||||
|
# repo root. The configmap_path is already repo-relative,
|
||||||
|
# so use it directly (cwd is repo root during restart).
|
||||||
|
source_config_dir = Path(configmap_path)
|
||||||
else:
|
else:
|
||||||
source_config_dir = resolve_config_dir(stack_name, configmap_name)
|
source_config_dir = resolve_config_dir(stack_name, configmap_name)
|
||||||
if os.path.exists(source_config_dir):
|
if os.path.exists(source_config_dir):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue