-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Is your feature request related to a problem? Please describe.
Either all (by default) or a subset (new 2.4 feature) of namespaces are watched for ingress related resources BUT ALSO SECRETS..
This means all found secrets are cached in the ingress controller even if not needed/used. This of course is a security concern.
With multi tenancy and namespace isolation as described by:
"Enabling Multi-Tenancy and Namespace Isolation in Kubernetes with NGINX - NGINX" https://www.nginx.com/blog/enabling-multi-tenancy-namespace-isolation-in-kubernetes-with-nginx/
There is no requirement/need for the controller to read secrets from the application namespaces.
Thus security can be improved by allowing to configure what namespaces should be watched for secrets.
Using custom RBAC roles and bindings the cluster admin can fine tune the controller privileges to the minimum for it to work.
Describe the solution you'd like
One possible and simple solution is to provide an additional flag similar to "watch-namespace" but for secrets. Let's call it "watch-secret-namespaces".
For this I have a patch I will submit for review.
Describe alternatives you've considered
Other implementations are more complex using for example annotations/labels on namespaces
Additional context