Merge pull request #81015 from draveness/feature/update-normalize-score-extension-point

feat:  return error when score is out of range
This commit is contained in:
Kubernetes Prow Robot
2019-08-15 02:32:35 -07:00
committed by GitHub
5 changed files with 76 additions and 4 deletions

View File

@@ -152,11 +152,11 @@ func (sp *ScorePlugin) Score(pc *framework.PluginContext, p *v1.Pod, nodeName st
return 0, framework.NewStatus(framework.Error, fmt.Sprintf("injecting failure for pod %v", p.Name))
}
score := 10
score := 1
if sp.numScoreCalled == 1 {
// The first node is scored the highest, the rest is scored lower.
sp.highScoreNode = nodeName
score = 100
score = framework.MaxNodeScore
}
return score, nil
}