Description
When setting up watches during initialization it's currently not possible to filter by any selectors (which is possible using list watches).
For example it is not possible to only watch pods with specific labels (e.g having the label pod-type: my-controller-type
). The current behavior results in very broad caching, which might not be desirable for large Kubernetes deployments.
In some scenarios an operator could contain multiple controllers, and they all share caches, so keying caches on GVK's alone might be problematic if they want to watch the same resource type, but with different filters.
When doing List
/Get
, how would one decide which of the caches to use? It seems that perhaps this needs to be an explicit choice by the operator developers?