From 45f086b94ed56d2d9d3d463942db48ecffea09a9 Mon Sep 17 00:00:00 2001 From: vanderliang Date: Tue, 12 Mar 2019 17:31:22 +0800 Subject: [PATCH] add balanced resource priority --- pkg/scheduler/plugins/nodeorder/nodeorder.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/scheduler/plugins/nodeorder/nodeorder.go b/pkg/scheduler/plugins/nodeorder/nodeorder.go index d2b40f6f1..58b481e6c 100644 --- a/pkg/scheduler/plugins/nodeorder/nodeorder.go +++ b/pkg/scheduler/plugins/nodeorder/nodeorder.go @@ -188,6 +188,13 @@ func (pp *nodeOrderPlugin) OnSessionOpen(ssn *framework.Session) { } score = score + host.Score + host, err = priorities.BalancedResourceAllocationMap(task.Pod, nil, nodeInfo) + if err != nil { + glog.Warningf("Balanced Resource Allocation Priority Failed because of Error: %v", err) + return 0, err + } + score = score + host.Score + host, err = priorities.CalculateNodeAffinityPriorityMap(task.Pod, nil, nodeInfo) if err != nil { glog.Warningf("Calculate Node Affinity Priority Failed because of Error: %v", err)