-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Allow users to change thresholds for evicting pods in VPA #3962
Allow users to change thresholds for evicting pods in VPA #3962
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Welcome @maksim-paskal! |
I signed it |
vertical-pod-autoscaler/pkg/updater/priority/update_priority_calculator.go
Outdated
Show resolved
Hide resolved
vertical-pod-autoscaler/pkg/updater/priority/update_priority_calculator.go
Outdated
Show resolved
Hide resolved
vertical-pod-autoscaler/pkg/updater/priority/update_priority_calculator.go
Outdated
Show resolved
Hide resolved
vertical-pod-autoscaler/pkg/updater/priority/update_priority_calculator.go
Outdated
Show resolved
Hide resolved
// Pods that live for at least that long can be evicted even if their | ||
// request is within the [MinRecommended...MaxRecommended] range. | ||
podLifetimeUpdateThreshold = time.Hour * 12 | ||
podLifetimeUpdateThreshold = flag.Duration("priority-lifetime-threshold", time.Hour*12, "Pods that live for at least that long can be evicted even if their request is within the [MinRecommended...MaxRecommended] range") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think current name of this flag could be more descriptive. What do you think about in-recommendation-bounds-eviction-lifetime-threshold
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think prefix in-recommendation
is unnecessary
what do you think about this names with pod prefix?
Name | Default | Usage |
---|---|---|
pod-update-threshold |
0.1 | Ignore updates that have priority lower than the value of this flag |
pod-eviction-lifetime-threshold |
12h | Pods that live for at least that long can be evicted even if their request is within the [MinRecommended...MaxRecommended] range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the in-recommendatiotion-bounds
part is necessary (we will evict younger pods, if they are out of the [MinRecommended...MaxRecommended] interval).
pod-eviction-lifetime-threshold
sounds like we wouldn't evict younger pods no matter what to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok - finally we got this flags. Ok?
Name | Default | Usage |
---|---|---|
in-recommendation-update-threshold |
0.1 | Ignore updates that have priority lower than the value of this flag |
in-recommendation-bounds-eviction-lifetime-threshold |
12h | Pods that live for at least that long can be evicted even if their request is within the [MinRecommended...MaxRecommended] range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Please update the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I didn't explain myself clearly enough, sorry about that. I think that we need the in-recommendation-bounds
prefix for the flag that controls after how long VPA will evict pods which have requests in the \[
MinRecommended...
MaxRecommended`] interval.
We don't need the prefix for the flag which controls priority threshold, below which we will ignore updates.
So I'm suggesting
Name | Default | Usage |
---|---|---|
pod-update-threshold | 0.1 | Ignore updates that have priority lower than the value of this flag |
in-recommendation-bounds-eviction-lifetime-threshold | 12h | Pods that live for at least that long can be evicted even if their request is within the [MinRecommended...MaxRecommended] range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - PR updated
vertical-pod-autoscaler/pkg/updater/priority/update_priority_calculator.go
Outdated
Show resolved
Hide resolved
5120808
to
4298564
Compare
4298564
to
35930c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thank you
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jbartosik, maksim-paskal 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 |
Allow users to change thresholds for evicting pods that use resources lower that recomended. Some pods needs to lower their request less than 12h.
This changes only allow users to change hardcoded values
New flags that will added with this PR
pod-update-threshold
in-recommendation-bounds-eviction-lifetime-threshold