-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Which component are you using?:
vertical-pod-autoscaler
/area vertical-pod-autoscaler
Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:
The updater currently will list all pods when it attempts to find pods that are controlled by VPAs. The updater does have a vpa-object-namespace flag but using this flag in environments where VPAs are created across namespaces that are dynamically created is not feasible. Although the pod lister does cache results, there are still lots of wasted cycles filtering pods in clusters with thousands of pods. Additionally, this represents a scalability concern for the updater component.
Describe the solution you'd like.:
I would like to add a pod-label-selectors flag to the updater component. These pod labels will be used to filter pods server side so that the updater can focus on a subset of pods that contain the given labels. This will add flexibility to the deployment so that we minimize the set of pods that the updater operates on in environments where namespaces and VPAs are dynamically created.
Describe any alternative solutions you've considered.:
I considered adding support for namespace regexes but the k8s client and APIs don't support regex filtering server side.
Additional context.:
The default updater-interval is 1m0s. In clusters with thousands of pods this could prevent us from lowering this interval to get more responsive pod updates.