-
Notifications
You must be signed in to change notification settings - Fork 261
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
🌱 Move webhooks into pkg/webhooks #1920
Conversation
Moves webhooks from api to pkg/webhooks making only mechanical code changes except for the removal of the defaulting webhooks, because they weren't used. This results in there now being no mutating webhook configured.
The conversion webhook does not try to register conversions for versions which are not present in the scheme.
The conversion webhook fails to register without this.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mdbooth 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 |
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Probably not necessary here, but: |
I think we still need to define webhooks for the list types even if they don't implement a validator or defaulter, because they will implicitly register a conversion webhook. |
/test pull-cluster-api-provider-openstack-e2e-full-test |
The e2e tests were failing because I had added a conversion webhook for
This also explains why the API validation tests weren't failing, because they weren't registering old API versions in the test scheme. I've fixed this by:
I've left these things as separate commits because they're logically separate changes. However, they are all required for the tests to pass on this PR. |
/test pull-cluster-api-provider-openstack-e2e-full-test |
Given that the full test passed, I'm guessing that could have been a flake. /retest-required |
/lgtm Big step in the right direction towards decoupling API types from imports, LGTM |
/hold cancel |
Moves webhooks from api to pkg/webhooks making only mechanical code changes except for:
The former results in there now being no mutating webhook configured.
/hold