-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Even Pods Spread - 4. Preemption Support #79062
Conversation
/kind feature |
/retest |
for pair, podSet := range topologyPairsPodSpreadMap.topologyPairToPods { | ||
// TODO(Huang-Wei): short circuit to skip non-visited <topologyKey: any value> pairs | ||
// if we see 0 as min match of the topologyKey | ||
if l := int32(len(podSet)); l < topologyPairsPodSpreadMap.minMatchMap[pair.key] { |
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.
Should we check that len(podSet) > 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.
Nope. If l == 0, it means there is a topology domain having 0 pod matching incoming pod's topologySpreadConstrains.
39de5fc
to
926ca0f
Compare
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Huang-Wei 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 |
f2d2a88
to
487dbdf
Compare
6dd412e
to
3a7b032
Compare
/retest |
- add removePod() for podSpreadMap
- add addPod() for podSpreadMap
- also add TODO items for potential perf optimization
3a7b032
to
7948479
Compare
/retest |
1 similar comment
/retest |
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
existingPods []*v1.Pod | ||
nodeIdx int // denotes which node 'addedPod' belongs to | ||
nodes []*v1.Node | ||
injectPodPointers map[topologyPair][]int // non-negative index refers to existingPods[i], negative index refers to addedPod |
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.
This is hard to understand. Maybe wantPodInTopology
. Although, this might go away with the count based map, so we could leave it for now.
/lgtm |
/hold cancel |
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. |
/retest |
What type of PR is this?
/sig scheduling
/hold
/assign @bsalamat
/cc @krmayankk
What this PR does / why we need it:
This is the 4th PR of the "Even Pods Spread" KEP implementation. After this PR, users can run workloads using "hard topologySpreadConstraints", and high priority Pod can preempt low priority one. (PR to support Priority will be sent out later)
Which issue(s) this PR fixes:
Part of #77284.
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
(will document all the changes in one place)