mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 10:48:15 +00:00
Align Extender's validation with prioritizers.
This commit is contained in:
@@ -35,8 +35,8 @@ func ValidatePolicy(policy schedulerapi.Policy) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, extender := range policy.ExtenderConfigs {
|
for _, extender := range policy.ExtenderConfigs {
|
||||||
if extender.Weight < 0 {
|
if extender.Weight <= 0 {
|
||||||
validationErrors = append(validationErrors, fmt.Errorf("Priority for extender %s should have a non negative weight applied to it", extender.URLPrefix))
|
validationErrors = append(validationErrors, fmt.Errorf("Priority for extender %s should have a positive weight applied to it", extender.URLPrefix))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return utilerrors.NewAggregate(validationErrors)
|
return utilerrors.NewAggregate(validationErrors)
|
||||||
|
|||||||
Reference in New Issue
Block a user