mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Use const value maxPriority instead of immediate value 10
Signed-off-by: sakeven <jc5930@sina.cn>
This commit is contained in:
@@ -87,7 +87,7 @@ func CalculateNodeAffinityPriorityReduce(pod *v1.Pod, meta interface{}, nodeName
|
||||
var fScore float64
|
||||
for i := range result {
|
||||
if maxCount > 0 {
|
||||
fScore = 10 * (float64(result[i].Score) / maxCountFloat)
|
||||
fScore = float64(schedulerapi.MaxPriority) * (float64(result[i].Score) / maxCountFloat)
|
||||
} else {
|
||||
fScore = 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user