Skip to content

Commit 7295e19

Browse files
committed
🌱 allow non-provider Deployments in Tilt
1 parent e90e266 commit 7295e19

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Tiltfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ def enable_provider(name, debug):
382382

383383
def find_object_name(objs, kind):
384384
for o in objs:
385-
if o["kind"] == kind:
385+
# Ignore objects that are not part of the provider, e.g. the ASO Deployment in CAPZ.
386+
if o["kind"] == kind and "cluster.x-k8s.io/provider" in o["metadata"]["labels"]:
386387
return o["metadata"]["name"]
387388
return ""
388389

hack/tools/internal/tilt-prepare/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,10 @@ func updateDeployment(prefix string, objs []unstructured.Unstructured, f updateD
871871
if obj.GetKind() != "Deployment" {
872872
continue
873873
}
874+
// Ignore Deployments that are not part of the provider, eg. ASO in CAPZ.
875+
if _, exists := obj.GetLabels()[clusterv1.ProviderNameLabel]; !exists {
876+
continue
877+
}
874878

875879
// Convert Unstructured into a typed object
876880
d := &appsv1.Deployment{}

0 commit comments

Comments
 (0)