-
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
API for KEP-4831: Control VPA eviction behavior based on scaling direction and resource #5176
API for KEP-4831: Control VPA eviction behavior based on scaling direction and resource #5176
Conversation
While looking for the best place to put this into the Updater, I found https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/pkg/updater/priority/pod_eviction_admission.go which was pulled in years ago with #1002 but apparently never used afterwards. Beata (after merging) even commented that the default implementation isn't even used: #1002 (review) I guess this is probably a good place to implement the filtering we want to do based on the comparison of There's also https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/pkg/updater/eviction/pods_eviction_restriction.go but that seems to be concerned with limiting eviction based on minimum available replicas and ensuring this also works for Jobs and other Pod owners in the same way. @jbartosik WDYT, should I just make use of the PodEvictionAdmission linked above? From a flow perspective, this seems to be a good fit, as it is used in the priority calculator, where Pod requests and target recommendation are compared to figure out if a Pod should be evicted and in which order. |
Yes, adding a new type that implements I'd implement it so when there are no restrictions it just allows the pod |
f15116a
to
46cd18d
Compare
46cd18d
to
74efdb1
Compare
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
74efdb1
to
e65bdc4
Compare
e65bdc4
to
7fee719
Compare
@jbartosik I've added an implementation PR using this API in #5599, so this API change is good to be reviewed from my side. Can you please take a look? Thanks! |
@jbartosik Can you please take a look? Thanks! |
@jbartosik Can you try to give this a review, please? Thanks! |
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.
Since in-place pod updates are now finally a thing (alpha but I hope for beta soon) I'd like to make sure this works well with support for in place updates.
I can see two approaches:
- have one "actuationRequirements" that affect both in-place and eviction actuation
- have separate controls for "evictionRequirements" and "inPlaceUpdateRequirements"
I lean towards single "actuationRequirements" because it's simpler and I don't see how I'd use separate controls for eviction and in place update. What do you think?
@@ -3,7 +3,7 @@ kind: CustomResourceDefinition | |||
metadata: | |||
annotations: | |||
api-approved.kubernetes.io: https://github.com/kubernetes/kubernetes/pull/63797 | |||
controller-gen.kubebuilder.io/version: v0.4.0 |
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.
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 sent #5754
Let's decide if we want to change the API for in-place updates before merging this (#5754) |
7fee719
to
1b35940
Compare
Force-pushed an update:
|
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 good to me
@mwielgus @gjtempleton could you take a look please
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mwielgus, voelzmo 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 |
Which component this PR applies to?
vertical-pod-autoscaler
What type of PR is this?
/kind feature
/kind api-change
What this PR does / why we need it
Implements KEP-4831: Control VPA eviction behavior based on scaling direction and resource
Which issue(s) this PR fixes:
API for #4831
Implementation is done in #5599
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: