mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #45091 from k82cn/update_weight_check
Automatic merge from submit-queue Align Extender's validation with prioritizers. **What this PR does / why we need it**: Align Extender's validation with prioritizers. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # N/A **Release note**: ```release-note-none ```
This commit is contained in:
		@@ -35,8 +35,8 @@ func ValidatePolicy(policy schedulerapi.Policy) error {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for _, extender := range policy.ExtenderConfigs {
 | 
			
		||||
		if extender.Weight < 0 {
 | 
			
		||||
			validationErrors = append(validationErrors, fmt.Errorf("Priority for extender %s should have a non negative weight applied to it", extender.URLPrefix))
 | 
			
		||||
		if extender.Weight <= 0 {
 | 
			
		||||
			validationErrors = append(validationErrors, fmt.Errorf("Priority for extender %s should have a positive weight applied to it", extender.URLPrefix))
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return utilerrors.NewAggregate(validationErrors)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user