-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Webhook marker allows handler path to be changed, but a deterministic handler is always registered #868
Comments
maybe this bug should rather be in kubebuilder project? Since it could be solved on multiple places and might also need update in documentation? Anyway - I took a look at it. One possible solution would be to allow overriding path inside the builder here controller-runtime/pkg/builder/webhook.go Line 38 in dc83571
WDYT? |
/assign |
@alenkacz Yeah, we could provide an option in webhook builder to set path and then update docs to say "path in webhook build must match path in webhook marker" or something to that effect. We probably also need some kind of validation if we let users set their own path. |
|
/kind design We need to think more about possible solutions |
/help |
@vincepri: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed 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. |
I am not familiar with the process here, what does "/help" mean? It seems that this is a pretty straightforward bug to fix. |
"/help" (adding the help-wanted label) is usually a good signal for issues to pick up 🙂 https://github.com/kubernetes/community/blob/master/contributors/guide/help-wanted.md#overview However @alenkacz self-assigned, maybe she is still working on this? We did just discuss it recently. FWIW I think adding to the builder seems reasonable. I think @DirectXMan12 mentioned some caveats with this, but i'm not seeing them on the controller-runtime side? Was it something to do with the kubebuilder side of templating things? |
seems reasonable. Might have to be path prefix. My concern was mainly that we don't want to tie those two together. Allowing you to customize the path (optionally) seems fine. |
I was thinking about taking a look at this issue if it's not being actively worked on. Thoughts? |
go ahead :-) |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. 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. |
Hello, I want to reopen this issue because the solution has not been implemented. I think that there is some users who wants to have a way to configure their webhooks using a custom path. /remove-lifecycle rotten The following PR (#2998) implements this functionality. |
@damsien: You can't reopen an issue/PR unless you authored it or you are a collaborator. 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. |
Webhook marker like the one below lets us change
path
where webhook is served. This creates the appropriateMutating|ValidatingWebhookConfiguration
manifest referencing thispath
.But webhook builder always registers the same path based on GVK:
controller-runtime/pkg/builder/webhook.go
Lines 158 to 166 in 29e923a
This is confusing when the user thinks they can customize the handler path, but it's actually ignored and worse, the generated webhook manifest doesn't work because path is incorrect.
If we are letting users change the path through the marker, perhaps it's better to add an option to webhook builder to configure handler path as well? Or, if the path is not supposed to be changed in the marker, we should say that in docs.
The text was updated successfully, but these errors were encountered: