-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 to internal #5711
🌱 Move webhooks to internal #5711
Conversation
Hi @kaitoii11. 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/test-infra repository. |
/ok-to-test |
webhooks/alias.go
Outdated
package webhooks | ||
|
||
import ( | ||
clusterwebhooks "sigs.k8s.io/cluster-api/webhooks/internal/webhooks" |
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.
clusterwebhooks "sigs.k8s.io/cluster-api/webhooks/internal/webhooks" | |
"sigs.k8s.io/cluster-api/webhooks/internal/webhooks" |
I think that would be better. Afaik there should be no name conflict
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.
Two nits
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.
Looking good! Could you move the files from cluster-api/webhooks/internal/webhooks/ to cluster-api/internal/webhooks ?
55fc3e5
to
196c7dc
Compare
196c7dc
to
990fd11
Compare
webhooks/alias.go
Outdated
|
||
// SetupWebhookWithManager sets up Cluster webhooks. | ||
func (webhook *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error { | ||
return (&webhooks.Cluster{}).SetupWebhookWithManager(mgr) |
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.
~
return (&webhooks.Cluster{}).SetupWebhookWithManager(mgr) | |
return (&webhooks.Cluster{Client: webhook.Client}).SetupWebhookWithManager(mgr) |
should fix the test failures
990fd11
to
d096694
Compare
/lgtm |
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
@kaitoii11: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
I think the methods that are currently under /webhooks have to be deprecated rather than removed under our deprecation policy - that's why apidiff is failing. |
This is not necessary given that webhook folder is not part of any release so far; also, FYI "moving to internal" was discussed in tht community and we should just upgrade v1.0.0 -> v1.1.0 (does not apply in this case) |
Yup that's fine. /lgtm |
Ah - I thought they would have been part of 1.01, but bugfix only means bugfix only 😄 /lgtm |
/lgtm |
[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 |
What this PR does / why we need it:
Move webhooks to internal and create alias.go for exposing Cluster and ClusterClass
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 #5599