-
Notifications
You must be signed in to change notification settings - Fork 49
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
separate webhooks from the api types package #672
separate webhooks from the api types package #672
Conversation
Welcome @d-honeybadger! |
Hi @d-honeybadger. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
5d0eca9
to
a1292a7
Compare
coupling api/ type packages with webhook by implementing webhook.Validator interface is, in hindsight, a bad design since api types are frequently imported in other projects and should therefore be as minimal as possible. The issue is discussed in kubernetes-sigs/controller-runtime#2596. B/c of that, webhook.Validator and webhook.Defaulter interfaces are deprecated from controller-runtime and removed in v0.20 Moving webhooks to a separate package allows repos that import api/v1beta1 to upgrade controller-runtime to v0.20, and also prepares capdo for controller-runtime v0.20 upgrade Signed-off-by: dkomsa <[email protected]>
a1292a7
to
d1d8918
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@m3co-code: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
is this something that is happening in CAPI and the other providers as well? |
/ok-to-test |
Ah that's a great question! I didn't put the webhooks under internal/: was looking for a minimal refactor, and so moved then just one level out. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: d-honeybadger, gottwald, m3co-code 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 |
/lgtm |
What this PR does / why we need it:
Coupling api/ type packages with webhook by implementing webhook.Validator interface is, in hindsight, a bad design since api types are frequently imported in other projects and should therefore be as minimal as possible. The issue is discussed in kubernetes-sigs/controller-runtime#2596.
B/c of that, webhook.Validator and webhook.Defaulter interfaces are deprecated from controller-runtime and removed in v0.20
Moving webhooks to a separate package allows repos that import api/v1beta1 to upgrade controller-runtime to v0.20, and also prepares capdo for controller-runtime v0.20 upgrade. CustomValidator and CustomDefaulter are the kubebuilder-recommended way of doing webhooks now.
Special notes for your reviewer:
Release note: