Add workload aware preemption#137606
Conversation
|
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The DetailsInstructions 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-sigs/prow repository. |
|
/area workload-aware |
tosi3k
left a comment
There was a problem hiding this comment.
Initial pass - I didn't go through the last 4 commits since I need to switch context to another review.
| // ExecutorPreemptor is an interface that represents a preemptor. | ||
| // It's mainly used to abstrac away fields needed for logging | ||
| // purposes during preemption calls done by Executor. | ||
| type ExecutorPreemptor interface { |
There was a problem hiding this comment.
Can't we extend the already existing Preemptor interface defined in types.go instead?
Feels as if we define gazillion additional receiver methods here that could be specified in the Preemptor interface in the first place.
There was a problem hiding this comment.
The problem is that Preemptor has more data in it, like CycleState for pods, which we do not need. This would force us to pass unnecessary data. Overall I would prefer to have this interface as an unimported internal only helper for unifying pod/pod group path, but Preempt method is also replaced in integration tests that are defined in other package.
ddd7efb to
2f3e7bb
Compare
dom4ha
left a comment
There was a problem hiding this comment.
Overall LGTM without tests yet
| } | ||
| } | ||
|
|
||
| victimsToPreempt = append(victimsToPreempt, nonViolatingVictims...) |
There was a problem hiding this comment.
The code is no longer there, so resolving
sanposhiho
left a comment
There was a problem hiding this comment.
Mostly LGTM on the implementation side, left some small ones only. As discussed at sig meeting, I leave the testing part for other reviewers.
wojtek-t
left a comment
There was a problem hiding this comment.
Overall this LGTM modulo the last comment about externalizing the plugin interface.
macsko
left a comment
There was a problem hiding this comment.
Reviewed the scheduler's core code and integration tests. Preemption code is still waiting my review
| } | ||
| } | ||
|
|
||
| func TestFilterVictimsWithPDBViolation(t *testing.T) { |
There was a problem hiding this comment.
Is it possible to verify in the tests whether filterVictimsWithPDBViolation works similar to the filterPodsWithPDBViolation?
There was a problem hiding this comment.
The problem is that filterPodsWithPDBViolation is in defaultpreemption package.
I think that for 1.37 we will unify this path as we need to handle pod group victims in pod by pod scenario, so the tests will also be unified.
|
/test pull-kubernetes-e2e-kind |
|
PR looks good, let's merge it! |
|
LGTM label has been added. DetailsGit tree hash: da5473bf6663f26367d982e8cc089c9ccd78d101 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Argh4k, macsko The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/woof |
DetailsIn response to this:
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-sigs/prow repository. |
|
/milestone v1.36 |
|
@Argh4k: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: e3fd7d5f3be12551724d8e931a2d2eaaebf18fb9 |
|
/test pull-kubernetes-e2e-gce |

What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR implements workload aware preemption from KEP-5710.
Which issue(s) this PR is related to:
KEP-5710
Special notes for your reviewer:
This PR builds on top of two PRs: #136577 and #137562. Changes done in this PR starts with the
Extend executor to work with pod groupscommitI am still actively extending test coverage for it.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: