-
Notifications
You must be signed in to change notification settings - Fork 962
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 podTopologySpread plugin #2487
Conversation
0d0d76c
to
ac9b4e6
Compare
balancedResourceWeight: 1, | ||
taintTolerationWeight: 1, | ||
imageLocalityWeight: 1, | ||
podTopologySpreadWeight: 1, |
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.
what's the default weight of podTopologySpread in kube-scheduler?
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.
If not set, it will be 2.
@@ -319,6 +320,11 @@ func (pp *predicatesPlugin) OnSessionOpen(ssn *framework.Session) { | |||
// 7. VolumeZone | |||
plugin, _ = volumezone.New(nil, handle) | |||
volumeZoneFilter := plugin.(*volumezone.VolumeZone) | |||
// 8. PodTopologySpread | |||
// TODO: make this configurable? ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints |
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.
it's ok not support cluster level default constraint in this pr. you can make a explicit comment here.
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.
done for that.
@@ -315,6 +323,12 @@ func (pp *nodeOrderPlugin) OnSessionOpen(ssn *framework.Session) { | |||
p, _ = tainttoleration.New(nil, handle) | |||
taintToleration := p.(*tainttoleration.TaintToleration) | |||
|
|||
ptsArgs := &config.PodTopologySpreadArgs{ | |||
DefaultingType: config.SystemDefaulting, |
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.
make clear whether the config.SystemDefaulting impact batch workload without configuring topologySpread.
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 default policy has action ScheduleAnyway
when unsatisfiable, so it will not affect filter process, and the default maxSkew
value has a little affect on score process.
pl.services = factory.Core().V1().Services().Lister() | ||
pl.replicationCtrls = factory.Core().V1().ReplicationControllers().Lister() | ||
pl.replicaSets = factory.Apps().V1().ReplicaSets().Lister() | ||
pl.statefulSets = factory.Apps().V1().StatefulSets().Lister() |
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.
please note that these listers will not work until it's informers are registered into the shared factory, and by now it's not; check out #2500 cache.go
if you want to test this plugin.
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.
That's great! thanks for reminding.
3cfee70
to
c6ef671
Compare
Signed-off-by: Xuzheng Chang <[email protected]>
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
/lgtm |
@jiangkaihua: changing LGTM is restricted to collaborators In 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/test-infra repository. |
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
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: shinytang6, william-wang 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 |
…add podTopologySpread plugin) conflict; Signed-off-by: shaoqiu <[email protected]>
add podTopologySpread plugin, imported from kubernetes.
Signed-off-by: Xuzheng Chang [email protected]
Warning FailedScheduling 19s volcano all nodes are unavailable: 3 plugin PodTopologySpread predicates failed node(s) didn't match pod topology spread constraints (missing required label).