Skip to content

Commit

Permalink
🌱 allow non-provider Deployments in Tilt
Browse files Browse the repository at this point in the history
  • Loading branch information
nojnhuh committed Sep 12, 2023
1 parent e90e266 commit 0423f60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def enable_provider(name, debug):

def find_object_name(objs, kind):
for o in objs:
if o["kind"] == kind:
if o["kind"] == kind and "cluster.x-k8s.io/provider" in o["metadata"]["labels"]:
return o["metadata"]["name"]
return ""

Expand Down
3 changes: 3 additions & 0 deletions hack/tools/internal/tilt-prepare/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,9 @@ func updateDeployment(prefix string, objs []unstructured.Unstructured, f updateD
if obj.GetKind() != "Deployment" {
continue
}
if _, exists := obj.GetLabels()[clusterv1.ProviderNameLabel]; !exists {
continue
}

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

0 comments on commit 0423f60

Please sign in to comment.