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

Add cpu target percentile parameter to VPA options in Shoot spec #9279

Merged

Conversation

voelzmo
Copy link
Member

@voelzmo voelzmo commented Feb 28, 2024

How to categorize this PR?

/area auto-scaling
/kind enhancement

What this PR does / why we need it:
This PR exposes the targetCPUPercentile parameter of the VPA recommender in the Shoot spec. With this parameter, Shoot owners or gardener operators can fine-tune the recommender behavior regarding recommendations for CPU.

The default is 0.9, which means the recommender will issue a recommendation that is fulfilling 90% of the observed CPU measurements. As CPU is a compressible resource, Shoot owner may want to set this to a smaller value, depending on the headroom on their nodes and the requirements for their workloads.

Release note:

In order to fine-tune VPA CPU recommendations, the CPU target percentile parameter for `vpa-recommender` can now be configured in the `Shoot` specification via the `.spec.kubernetes.verticalPodAutoscaler.targetCPUPercentile` field.

@gardener-prow gardener-prow bot added area/auto-scaling Auto-scaling (CA/HPA/VPA/HVPA, predominantly control plane, but also otherwise) related kind/enhancement Enhancement, improvement, extension labels Feb 28, 2024
@gardener-prow gardener-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 28, 2024
@voelzmo
Copy link
Member Author

voelzmo commented Feb 28, 2024

/cc @vlerenc @andrerun

@voelzmo
Copy link
Member Author

voelzmo commented Feb 28, 2024

/hold running some experiments to verify this has the desired effect

@gardener-prow gardener-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Feb 28, 2024
pkg/apis/core/types_shoot.go Outdated Show resolved Hide resolved
pkg/apis/core/v1beta1/types_shoot.go Show resolved Hide resolved
@voelzmo voelzmo force-pushed the enh/vpa-cpu-target-percentile-parameter branch from f43a186 to 623125f Compare February 28, 2024 14:04
@gardener-prow gardener-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2024
@voelzmo voelzmo force-pushed the enh/vpa-cpu-target-percentile-parameter branch from 623125f to daa3ad5 Compare February 29, 2024 13:03
@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 29, 2024
pkg/apis/core/v1beta1/types_shoot.go Outdated Show resolved Hide resolved
@voelzmo voelzmo force-pushed the enh/vpa-cpu-target-percentile-parameter branch from daa3ad5 to bb8d263 Compare March 1, 2024 08:49
@voelzmo
Copy link
Member Author

voelzmo commented Mar 1, 2024

/retest
/hold cancel
Tests have been successful: when modifying the parameter, we see that his has a direct impact on the cpu recommendations. Lower values lead to lower recommendations overall.

@gardener-prow gardener-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2024
@rfranzke
Copy link
Member

rfranzke commented Mar 1, 2024

@voelzmo
Copy link
Member Author

voelzmo commented Mar 4, 2024

PR looks good, but adaptation in https://github.com/gardener/gardener/blob/master/docs/usage/shoot_autoscaling.md#vertical-pod-auto-scaling is still missing.

Ah, sorry, thanks for catching that I missed that.
On a related note: I just find myself copy-pasting the same things that I already wrote in the API docs for those properties. Should we maybe just link to the API docs instead of replicating that information here?

@voelzmo voelzmo force-pushed the enh/vpa-cpu-target-percentile-parameter branch from bb8d263 to c8aeae3 Compare March 4, 2024 09:15
@rfranzke
Copy link
Member

rfranzke commented Mar 4, 2024

Should we maybe just link to the API docs instead of replicating that information here?

We could. OTOH, the API docs typically do not contain too much information. Maybe this works in case of the VPA fields - if so, feel free to just link the generated docs (maybe in a separate PR).

/lgtm
/approve

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2024
Copy link
Contributor

gardener-prow bot commented Mar 4, 2024

LGTM label has been added.

Git tree hash: 8e12fdab4f4492df3f9ce1935384df1fe9774ac6

Copy link
Contributor

gardener-prow bot commented Mar 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rfranzke

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 4, 2024
@voelzmo
Copy link
Member Author

voelzmo commented Mar 4, 2024

/retest

@gardener-prow gardener-prow bot merged commit db31dd7 into gardener:master Mar 4, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/auto-scaling Auto-scaling (CA/HPA/VPA/HVPA, predominantly control plane, but also otherwise) related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants