-
Notifications
You must be signed in to change notification settings - Fork 425
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
allow customizing generated webhook's name and its service's namespace and name #865
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
@davidxia sounds reasonable, if you want to open a PR for it |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". 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. |
@sbueringer thanks. Can you point to the places in code where I'll need to change things? |
@camilamacedo86 don't know if you're also a maintainer for this repo, but are you able to give me some pointers to start a PR for this one too? 🙏 |
@sbueringer: Reopened 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-sigs/prow repository. |
@sbueringer thanks! Just curious why the |
I would say because nobody thought about updating the docs over there :) Although I wonder if that page is generated (but I don't know) |
|
closes kubernetes-sigs#865 ## example usage ``` ❯ GOBIN=(pwd)/bin go install ./cmd/* ❯ ./bin/controller-gen webhook -w Webhook +kubebuilder:webhook:admissionReviewVersions=<[]string>,failurePolicy=<string>,groups=<[]string>[,matchPolicy=<string>],mutating=<bool>,name=<string>[,path=<string>][,reinvocationPolicy=<string>],resources=<[]string>[,sideEffects=<string>][,timeoutSeconds=<int>][,url=<string>],verbs=<[]string>,versions=<[]string>[,webhookVersions=<[]string>] package specifies how a webhook should be served. +kubebuilder:webhookconfiguration:mutating=<bool>[,name=<string>] package specifies how a webhook should be served. ```
closes kubernetes-sigs#865 ## example usage ``` ❯ GOBIN=(pwd)/bin go install ./cmd/* ❯ ./bin/controller-gen webhook -w Webhook +kubebuilder:webhook:admissionReviewVersions=<[]string>,failurePolicy=<string>,groups=<[]string>[,matchPolicy=<string>],mutating=<bool>,name=<string>[,path=<string>][,reinvocationPolicy=<string>],resources=<[]string>[,sideEffects=<string>][,timeoutSeconds=<int>][,url=<string>],verbs=<[]string>,versions=<[]string>[,webhookVersions=<[]string>] package specifies how a webhook should be served. +kubebuilder:webhookconfiguration:mutating=<bool>[,name=<string>] package specifies how a webhook should be served. ```
closes kubernetes-sigs#865 ## example usage ``` ❯ GOBIN=(pwd)/bin go install ./cmd/* ❯ ./bin/controller-gen webhook -w Webhook +kubebuilder:webhook:admissionReviewVersions=<[]string>,failurePolicy=<string>,groups=<[]string>[,matchPolicy=<string>],mutating=<bool>,name=<string>[,path=<string>][,reinvocationPolicy=<string>],resources=<[]string>[,sideEffects=<string>][,timeoutSeconds=<int>][,url=<string>],verbs=<[]string>,versions=<[]string>[,webhookVersions=<[]string>] package specifies how a webhook should be served. +kubebuilder:webhookconfiguration:mutating=<bool>[,name=<string>] package specifies how a webhook should be served. ```
closes kubernetes-sigs#865 ## example usage ``` ❯ GOBIN=(pwd)/bin go install ./cmd/* ❯ ./bin/controller-gen webhook -w Webhook +kubebuilder:webhook:admissionReviewVersions=<[]string>,failurePolicy=<string>,groups=<[]string>[,matchPolicy=<string>],mutating=<bool>,name=<string>[,path=<string>][,reinvocationPolicy=<string>],resources=<[]string>[,sideEffects=<string>][,timeoutSeconds=<int>][,url=<string>],verbs=<[]string>,versions=<[]string>[,webhookVersions=<[]string>] package specifies how a webhook should be served. +kubebuilder:webhookconfiguration:mutating=<bool>[,name=<string>] package specifies how a webhook should be served. ``` Signed-off-by: David Xia <[email protected]>
@sbueringer I added a task list to the issue description. We've finished the first one. For the second of allow customizing webhook Service's namespace and name, what do you think of adding an optional Currently Proposed |
Thx. Sounds good |
Also it would be nice to have a |
I'm using kubebuilder which generates webhooks with these markers. The generated mutating webhook has a hardcoded name of
mutating-webhook-configuration
here, and the validating webhook has a hardcoded name ofvalidating-webhook-configuration
here.The webhook's
.webhooks[].clientConfig.service
also have their namespace hardcoded tosystem
and name towebhook-service
, respectively.I'd like to be able to customize these three parameters with the markers. My webhook Service might be in a different namespace and name. I might also have different webhooks that need different [Validating|Mutating]WebhookConfiguration names. It'd be nice to not have to generate these webhook YAMLs and then have to use kustomize to alter them.
Is this a feature request you're open to?
related to #490
Tasks
The text was updated successfully, but these errors were encountered: