Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 allow non-provider Deployments in Tilt #9404

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Sep 12, 2023

What this PR does / why we need it:

This PR updates the Tilt dev setup to still install, but otherwise ignore, Deployment resources without a cluster.x-k8s.io/provider that come with a provider. CAPI may overwrite the command for the container in a way that isn't compatible with the image, for example if the image doesn't contain sh, such that the container fails to start.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

/area devtools

@k8s-ci-robot k8s-ci-robot added area/devtools Issues or PRs related to devtools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 12, 2023
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 12, 2023
@@ -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"]:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ensures the provider's *_controller item in tilt refers to the right Deployment.

@fabriziopandini
Copy link
Member

What use case are we solving here?
We already have the additional_resources to allow to deploy yaml for objects that are not providers, and I'm not sure why it is required to add a second path to solve the same problem

@fabriziopandini
Copy link
Member

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 14, 2023
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Sep 18, 2023

What use case are we solving here? We already have the additional_resources to allow to deploy yaml for objects that are not providers, and I'm not sure why it is required to add a second path to solve the same problem

CAPZ now includes Azure Service Operator in its manifests, so those components are not "additional" in the sense that they're already included and we don't have raw YAML representing those components since we feed them through kustomize. I expect any other provider that might also install another Deployment in the future would run into these same issues.

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nojnhuh sorry for getting late to this, I'm ok with the change but please add some comment so we keep track of why we are doing this

hack/tools/internal/tilt-prepare/main.go Show resolved Hide resolved
Tiltfile Show resolved Hide resolved
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Nov 20, 2023

@fabriziopandini Thanks! Just pushed those changes.

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 20, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2e1d80a8f62628629c9938771c754c7dfb8b5176

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2023
@fabriziopandini
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 20, 2023
@k8s-ci-robot k8s-ci-robot merged commit 2f3e085 into kubernetes-sigs:main Nov 20, 2023
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Nov 20, 2023
@nojnhuh nojnhuh deleted the tilt-deploy branch November 20, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/devtools Issues or PRs related to devtools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants