namespaceSelector of the webhooks doesn't have effect since scope
is not defined
#3675
Labels
bug
Something isn't working
scope
is not defined
#3675
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: