-
Notifications
You must be signed in to change notification settings - Fork 786
namespaceSelector of the webhooks doesn't have effect since scope
is not defined
#3675
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
Comments
@plavy I dont think For making the webhook complaint you may be able to use - https://open-policy-agent.github.io/gatekeeper/website/docs/exempt-namespaces/. Which will prevent GK from operationing on certain namespaces, but GK webhook might not be in the clear according to GKE as it still will use the same config. @maxsmythe @ritazh @sozercan thughts on this? |
@JaydipGabani I see your point, but this webhook config is still considered unsafe by GKE and currently there is no way in values.yaml to configure the scope and make it safe. Actually, I saw now that you have |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
PR #3676 |
What steps did you take and what happened:
Helm chart generates mutating-webhook and validating-webhook configurations, but without specifying
scope
forrules
. When thescope
is not specified, it is set to*
by Kubernetes. This means thatnamespaceSelector
that is also used in the webhook configuration actually doesn't have the intended effect, since the scope is unrestricted.From the official documentation:
When using
namespaceSelector
, scope should be set toNamespaced
, as explained here.What did you expect to happen:
scope
of webhook configurations set toNamespaced
, or at least an option in values.yaml to set it that way.Anything else you would like to add:
This issue also causes warning on GKE, saying that the webhook is unsafe.
Environment:
The text was updated successfully, but these errors were encountered: