Repository navigation
fix(vpa): keep cpu and memory requests in the CSI and module controller pods - #230
Merged
Merged
Conversation
…er pods
With vertical-pod-autoscaler-crd enabled, the CSI controller, CSI node and
module controller templates left the cpu and memory requests out and relied on
the VPA admission controller to set them when a pod is created. Until it does,
the pod has ephemeral-storage requests only and is BestEffort. The VPA updater
in InPlaceOrRecreate mode cannot resize such a pod in place ("Pod QOS Class may
not change as a result of resizing") and evicts it instead; the replacement is
BestEffort again, and the loop goes on until the admission controller starts
setting requests.
On a fresh e2e cluster of csi-mind-ustor the CSI controller was evicted every
30 seconds for about seven minutes after its VerticalPodAutoscaler appeared.
The sidecars hold their leader leases for 30 seconds, so none of them became
leader and a claim stayed Pending for the whole loop.
The templates now always render the requests the VerticalPodAutoscaler uses
as minAllowed. The pod is Burstable from the start, the admission controller
still replaces the requests with the recommendation when it has one, and the
updater resizes the pod in place instead of evicting it.
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Member
Author
|
Checked on the e2e suite of the csi-mind-ustor module, on fresh clusters with VPA enabled:
The module had no other change between the last failing run and the passing one. |
kkozoriz
self-requested a review
October 28, 2026 16:36
kkozoriz
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With
vertical-pod-autoscaler-crdenabled,helm_lib_csi_controller_manifests,helm_lib_csi_node_manifestsandhelm_lib_module_controller_manifestsstop rendering the cpu and memory requests of their containers and leave them to the VPA admission controller. They now always render them: the same values the VerticalPodAutoscaler uses asminAllowed(provisioner_resources,node_resources,helm_lib_module_controller_resourcesand so on).Unit tests cover all three templates with
vertical-pod-autoscaler-crdenabled. They fail onmainand pass with the change. The chart version goes to 1.72.34.No restart of critical cluster components. Pods of the affected workloads are recreated once, when a module picks up the new lib-helm, because the pod template changes.
Why do we need it, and what problem does it solve?
Until the admission controller sets requests on a new pod, the pod has an
ephemeral-storagerequest only and its QoS class is BestEffort. The VPA updater inInPlaceOrRecreatemode cannot resize a BestEffort pod in place:It evicts the pod instead. The replacement is BestEffort as well, and the loop goes on until the admission controller starts setting requests.
On a fresh e2e cluster of the csi-mind-ustor module, the CSI controller was evicted every 30 seconds for about seven minutes after its VerticalPodAutoscaler appeared (12:56–13:02, one eviction per updater loop). The CSI sidecars hold their leader leases for 30 seconds, so none of them ever became leader, and a PersistentVolumeClaim stayed Pending for the whole loop. The csi-node and module controller pods went through the same evictions. On
mainof that module the same step took 95 seconds instead of the usual 15._cloud_controller_manager.tpl,_cloud_data_discoverer.tpland_capi_controller_manager.tplfollow the same pattern and have tests that pin it. They are left as they are so their owners can decide.What is the expected result?
vertical-pod-autoscaler-crdis enabled.EvictedByVPAevents right after a module is enabled.Checklist