Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add MutatingWebhookConfiguration rule scope #976

Closed
yachub opened this issue Nov 9, 2023 · 0 comments · Fixed by #1037
Closed

Add MutatingWebhookConfiguration rule scope #976

yachub opened this issue Nov 9, 2023 · 0 comments · Fixed by #1037
Labels
enhancement New feature or request

Comments

@yachub
Copy link

yachub commented Nov 9, 2023

Is your feature request related to a problem? Please describe.

We received a suggestion in GKE that the vault-agent-injector-cfg was "Intercepting resources in the kube-system namespace" and linked to their docs at https://cloud.google.com/kubernetes-engine/docs/how-to/optimize-webhooks#unsafe-webhooks for resolution.

Specifically, "A webhook is flagged if scope is *. Or, a webhook is flagged if scope is Namespaced and includes kube-system and kube-node-lease".

If a webhook is intercepting any resources in system-managed namespaces, or certain types of resources, GKE considers this unsafe and recommends that you update the webhooks to avoid intercepting these resources.

Describe the solution you'd like

If I'm understanding correctly, should an optional rule scope be added to the MutatingWebhookConfiguration?

rules:
- operations: ["CREATE", "UPDATE"]
apiGroups: [""]
apiVersions: ["v1"]
resources: ["pods"]

Describe alternatives you've considered
None

Additional context
None

@yachub yachub added the enhancement New feature or request label Nov 9, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant