-
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
🌱 Let disable webhooks #4709
🌱 Let disable webhooks #4709
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[This change](https://github.com/kubernetes-sigs/cluster-api/commit/280db9a796d5e1c2b3b75aa3036fcfe44f669909#diff-a46ea7e53a9e71ee7642[…]57385a613ca5d51cL170-L173) made webhooks to always run as part of the manager. I'd like to keep the ability to disable running webhooks. Motivation is as adopting and building atop CAPI I’d like to do so gradually, going all in once with webhooks increase complexisty and resistance. Also this is necessary to support other type than single controller deployments and should be part of this contract https://master.cluster-api.sigs.k8s.io/developer/architecture/controllers/support-multiple-instances.html#contract
e89b647
to
f477e28
Compare
This PR drops the ExternalInfraCluster CRD in favour of AWSCluster. Originally we added support for externally managed infra in CAPA via the ExternalInfraCluster CRD kubernetes-sigs/cluster-api-provider-aws#2124 and we used that commit of CAPA in hypershift. Later on we decided to revert that approach upstream and reuse the existing ${infra}Cluster CRDs with an annotation to support externally managed infrastructure kubernetes-sigs/cluster-api#4135 This PR bring latest CAPI/CAPA with one additional patch on top kubernetes-sigs/cluster-api#4709 kubernetes-sigs/cluster-api-provider-aws#2453 to avoid running webhooks. As a follow up we need to rebuild the images from the main branch once those patches are merged or otherwise enable webhooks.
This PR drops the ExternalInfraCluster CRD in favour of AWSCluster. Originally we added support for externally managed infra in CAPA via the ExternalInfraCluster CRD kubernetes-sigs/cluster-api-provider-aws#2124 and we used that commit of CAPA in hypershift. Later on we decided to revert that approach upstream and reuse the existing ${infra}Cluster CRDs with an annotation to support externally managed infrastructure kubernetes-sigs/cluster-api#4135 This PR bring latest CAPI/CAPA with one additional patch on top kubernetes-sigs/cluster-api#4709 kubernetes-sigs/cluster-api-provider-aws#2453 to avoid running webhooks. As a follow up we need to rebuild the images from the main branch once those patches are merged or otherwise enable webhooks.
@fabriziopandini @vincepri @CecileRobertMichon @JoelSpeed @sbueringer would you have any objection to get this into v1alpha4? |
If we do go forward with this change, I'd like to propose that we add a new flag like Thinking about it a bit more, even if the webhooks are registered and the server is running, if the service isn't registered within the CRDs or yaml definition truthfully the code won't run.
Webhooks code is treated as part of the codebase, and it's important that it runs on the same version as the manager. |
@vincepri I also thought about this, the only drawback I can think of is you still need to provide a tls cert for the webhook server to not break the manager. Is there anything else you can think of? otherwise I think that's ok to satisfy https://master.cluster-api.sigs.k8s.io/developer/architecture/controllers/support-multiple-instances.html#contract |
Wouldn't cert-manager generate the certs for you? |
As discussed, there's no strict requirement to expose the webhooks CRs which would satisfy the contract above |
@enxebre: Closed this PR. 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/test-infra repository. |
What this PR does / why we need it:
This change made webhooks to always run as part of the manager.
I'd like to keep the ability to disable running webhooks. Motivation is as adopting and building atop CAPI I’d like to do so gradually, going all in once with webhooks increase complexisty and resistance.
Also this is necessary to support other type than single controller deployments and should be part of this contract https://master.cluster-api.sigs.k8s.io/developer/architecture/controllers/support-multiple-instances.html#contract
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 #