Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPA - Support of Static Policy for CPU Management #5236

Closed
dbenque opened this issue Oct 7, 2022 · 1 comment · Fixed by #5313
Closed

VPA - Support of Static Policy for CPU Management #5236

dbenque opened this issue Oct 7, 2022 · 1 comment · Fixed by #5313
Labels
area/vertical-pod-autoscaler kind/feature Categorizes issue or PR as related to a new feature.

Comments

@dbenque
Copy link
Contributor

dbenque commented Oct 7, 2022

Which component are you using?:

Vertical-Pod-Autoscaler/Recommender

Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:

Feature: as a user of the Static Policy of CPU management I would like VPA to ensure that CPU value is set as an integer. As a user I should be able to specify if the recommendation should be round/ceil/floor to become an integer and respect static CPU allocation requirement, from the doc:

Only containers that are both part of a Guaranteed pod and have integer CPU requests are assigned exclusive CPUs.

Describe the solution you'd like.:

The user should be able to define which container should have its CPU recommendation amended to be an integer.
To start the API can simply be an annotation on the VPA object:

vpa-post-processor.kubernetes.io/{containerName}_integerCPU={round|ceil|floor}

vpa-post-processor.kubernetes.io/kafka_integerCPU=“round”
Later when we have more user feedback this annotation can become a structured field in the vpa.Spec.ResourcePolicy

Implementation:
Today the VPA recommendation is amended to stay within the minAllowed/maxAllowed
We should be able to introduce more post-processing capabilities in the recommender.

Example:
The recommender internally delivers a recommendation of 3.85 CPU for container kafka, the recommendation that is written in the VPA object should be 4 CPU if the user has specified vpa-post-processor.kubernetes.io/kafka_integerCPU=“round”

Describe any alternative solutions you've considered.:

Write an entire dedicated custom recommender. I started to do that and realised that I was duplicating 90% of the default recommender code. Plus it will really be an heavy task to operate 2 different recommenders for a small difference in behavior.

Additional context.:

The issue #5212 can be handled in the exact same way from an implementation point of view.

@jbartosik
Copy link
Collaborator

If we implemented #5237 then you could set N=1 and you would get this behavior. Or is there a difference I missed?

@dbenque dbenque changed the title VPA - Support of Static CPU Allocation VPA - Support of Static Policy for CPU Management Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertical-pod-autoscaler kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants