Skip to content
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

[Feature] Make MutatingWebhookConfiguration, ValidatingWebhookConfiguration name configurable #7997

Open
2 tasks done
iAnomaly opened this issue Aug 9, 2023 · 4 comments · May be fixed by #8059
Open
2 tasks done
Labels
enhancement New feature or request webhook

Comments

@iAnomaly
Copy link

iAnomaly commented Aug 9, 2023

Problem Statement

Multiple sources confirm anecdotally that the Kubernetes admission webhook requests are processed serially in lexicographical order. Given that Kyverno is a policy enforcement solution, it should be able to be configure as close as possible to the beginning of this pipeline.

Solution Description

*WebhookConfiguration names currently appeared hard coded here. Solution should support overriding these via runtime configuration (environment variables, command arguments, etc.) that can also be configured through Helm Chart values.

Alternatives

No response

Additional Context

I am trying to label Pods with a Kyverno policy for service mesh proxy injection by Istio but Istio's MutatingWebhookConfiguration responsible for injecting said Pods is lexicographically "lower" (comes before) Kyverno's:

...
mutatingwebhookconfiguration.admissionregistration.k8s.io/istio-sidecar-injector
...
mutatingwebhookconfiguration.admissionregistration.k8s.io/kyverno-resource-mutating-webhook-cfg
...

Slack discussion

https://kubernetes.slack.com/archives/CLGR9BJU9/p1691624820592279

Research

  • I have read and followed the documentation AND the troubleshooting guide.
  • I have searched other issues in this repository and mine is not recorded.
@iAnomaly iAnomaly added enhancement New feature or request triage Default label assigned to all new issues indicating label curation is needed to fully organize. labels Aug 9, 2023
@welcome
Copy link

welcome bot commented Aug 9, 2023

Thanks for opening your first issue here! Be sure to follow the issue template!

@chipzoller chipzoller added webhook and removed triage Default label assigned to all new issues indicating label curation is needed to fully organize. labels Aug 10, 2023
@chipzoller
Copy link
Member

The only webhook which would benefit from a custom name is the resource mutating webhook.

@iAnomaly iAnomaly linked a pull request Aug 17, 2023 that will close this issue
9 tasks
@iAnomaly
Copy link
Author

@chipzoller: Initial attempt at resolving this issue in #8059. How do you feel about applying the same prefix to all mutating webhooks for consistency even if the resource mutating webhook is the only one that would benefit functionally?

@chipzoller
Copy link
Member

Probably not an issue but it would need to be attended carefully to ensure there are no code paths which reference static names anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request webhook
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants