mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 05:40:42 +00:00 
			
		
		
		
	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:
		| @@ -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 | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user