k8s: extract basename from stack path for labels
Stack.name contains the full absolute path from the spec file's "stack:" key (e.g. /home/.../stacks/hyperlane-minio). K8s labels must be <= 63 bytes and alphanumeric. Extract just the directory basename (e.g. "hyperlane-minio") before using it as a label value. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>test-ci
parent
8769df6c35
commit
8530aa3385
|
|
@ -126,7 +126,10 @@ class K8sDeployer(Deployer):
|
||||||
# Use deployment-specific namespace for resource isolation and easy cleanup
|
# Use deployment-specific namespace for resource isolation and easy cleanup
|
||||||
self.k8s_namespace = f"laconic-{compose_project_name}"
|
self.k8s_namespace = f"laconic-{compose_project_name}"
|
||||||
self.cluster_info = ClusterInfo()
|
self.cluster_info = ClusterInfo()
|
||||||
stack_name = deployment_context.stack.name if deployment_context else ""
|
# stack.name may be an absolute path (from spec "stack:" key after
|
||||||
|
# path resolution). Extract just the directory basename for labels.
|
||||||
|
raw_name = deployment_context.stack.name if deployment_context else ""
|
||||||
|
stack_name = Path(raw_name).name if raw_name else ""
|
||||||
self.cluster_info.int(
|
self.cluster_info.int(
|
||||||
compose_files,
|
compose_files,
|
||||||
compose_env_file,
|
compose_env_file,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue