Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Commit fb8ae80

Browse files
authored
Merge pull request #636 from DeliangFan/add-balance-resource-priority
add balanced resource priority
2 parents 17095eb + 45f086b commit fb8ae80

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/scheduler/plugins/nodeorder/nodeorder.go

+7
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,13 @@ func (pp *nodeOrderPlugin) OnSessionOpen(ssn *framework.Session) {
188188
}
189189
score = score + host.Score
190190

191+
host, err = priorities.BalancedResourceAllocationMap(task.Pod, nil, nodeInfo)
192+
if err != nil {
193+
glog.Warningf("Balanced Resource Allocation Priority Failed because of Error: %v", err)
194+
return 0, err
195+
}
196+
score = score + host.Score
197+
191198
host, err = priorities.CalculateNodeAffinityPriorityMap(task.Pod, nil, nodeInfo)
192199
if err != nil {
193200
glog.Warningf("Calculate Node Affinity Priority Failed because of Error: %v", err)

0 commit comments

Comments
 (0)