Add app label to Deployment metadata for label-based cleanup
Deployments were the only resource type missing the `app` label on their metadata. Services, ConfigMaps, PVCs, and Jobs all had it. Without it, _delete_resources_by_label() in down() couldn't find Deployments when cleaning up in a shared namespace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
da3850a727
commit
577576fd69
@ -687,7 +687,10 @@ class ClusterInfo:
|
||||
deployment = client.V1Deployment(
|
||||
api_version="apps/v1",
|
||||
kind="Deployment",
|
||||
metadata=client.V1ObjectMeta(name=f"{self.app_name}-deployment"),
|
||||
metadata=client.V1ObjectMeta(
|
||||
name=f"{self.app_name}-deployment",
|
||||
labels={"app": self.app_name, **({"app.kubernetes.io/stack": self.stack_name} if self.stack_name else {})},
|
||||
),
|
||||
spec=spec,
|
||||
)
|
||||
return deployment
|
||||
|
||||
Loading…
Reference in New Issue
Block a user