Commit 64a7bdf6 authored by Klaus Ma's avatar Klaus Ma

Align Extender's validation with prioritizers.

parent 19795ea7
...@@ -35,8 +35,8 @@ func ValidatePolicy(policy schedulerapi.Policy) error { ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment