Use const value maxPriority instead of immediate value 10

Signed-off-by: sakeven <jc5930@sina.cn>
This commit is contained in:
sakeven
2017-07-12 18:16:54 +08:00
parent b139d9d759
commit 6aeb77aa6a
19 changed files with 111 additions and 118 deletions

View File

@@ -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
}