kubernetes-sigs / controller-tools

Tools to use with the controller-runtime libraries
Apache License 2.0
721 stars 416 forks source link

webhook generation hardcodes name and namespace #490

Open ellistarn opened 4 years ago

ellistarn commented 4 years ago

https://github.com/kubernetes-sigs/controller-tools/blob/9a9db70f732af8f2ed69184a6e849f25d8e5a05e/pkg/webhook/parser.go#L243

I'd like this to be configurable so that I don't have to use Kustomize to add prefixes.

fejta-bot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot commented 3 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community. /close

k8s-ci-robot commented 3 years ago

@fejta-bot: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/controller-tools/issues/490#issuecomment-778381081): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Mark the issue as fresh with `/remove-lifecycle rotten`. > >Send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ellistarn commented 3 years ago

@DirectXMan12 any thoughts here?

davidxia commented 10 months ago

I run my webhook in a different namespace than system so also need to customize the namespace.

davidxia commented 10 months ago

Looks like the [Mutating|Validating]WebhookConfigurations' name itself is also hardcoded. I also need to customize this.

I need to customize these because if I deploy two different controllers to the same cluster, I can't use controller-gen's generated files without modification since the [Mutating|Validating]WebhookConfigurations' own names and that of their .webhooks[].clientConfig.name and .webhooks[].clientConfig.name conflict with each other.

sbueringer commented 5 months ago

/reopen /lifecycle frozen

k8s-ci-robot commented 5 months ago

@sbueringer: Reopened this issue.

In response to [this](https://github.com/kubernetes-sigs/controller-tools/issues/490#issuecomment-2046559258): >/reopen >/lifecycle frozen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
sbueringer commented 5 months ago

/remove-lifecycle rotten