瀏覽代碼

minor bug

Achilleas Tzenetopoulos 5 年之前
父節點
當前提交
1961a4f4ff
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      kubernetes-v1.15.4/pkg/scheduler/algorithm/priorities/custom_resource_allocation.go

+ 2 - 0
kubernetes-v1.15.4/pkg/scheduler/algorithm/priorities/custom_resource_allocation.go

@@ -160,6 +160,8 @@ func customResourceScorer(nodeName string) (float64, error) {
 
 		if sum := average["c6res"] * float64(len(cores)); sum < 1 {
 			res = res * sum
+		} else {
+			res = res * 1 * float64(len(cores))
 		}
 		// Select Node