-
Notifications
You must be signed in to change notification settings - Fork 1.2k
✨ Make webhook setup conditional based on user provided config #3385
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
base: main
Are you sure you want to change the base?
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pmalek 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 |
|
/test pull-controller-runtime-test |
|
Am I understanding correctly that the use case is to have CRDs with multiple apiVersions without conversion? How does this work? |
|
@pmalek: 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-sigs/prow repository. I understand the commands that are listed here. |
For my particular use case I don't need the conversion as I'm only testing the CRD CEL expressions and not controller's behavior. After looking at the test code in controller-runtime I came up with a stub conversion webhook server: which fulfilled my needs. I think we can close this one unless there's something that I missed which would make it reasonable to skip webhook altogether for use cases like mine. |
|
I'm mostly wondering why it just doesn't work out of the box. If the schema is configured correctly and conversion is implemented correctly envtest should just create a fully functioning conversion endpoint |
For historical reference (in case someone want to debug this):
|
Make webhook configuration apply only if it's specified by the user through:
.WebhookInstallOptions.ValidatingWebhooks.WebhookInstallOptions.MutatingWebhooks.Spec.Conversion.WebhooksetWithout this change, environments with CRDs that have multiple versions receive the following errors:
x-ref: https://kubernetes.slack.com/archives/C02MRBMN00Z/p1763049500384929