mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
More understandable error for scheduler configuration validation
Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
parent
8a9e0d936a
commit
538248df0d
@ -273,11 +273,11 @@ func validateCommonQueueSort(path *field.Path, profiles []config.KubeSchedulerPr
|
||||
curr = profiles[i].Plugins.QueueSort
|
||||
}
|
||||
if !cmp.Equal(canon, curr) {
|
||||
errs = append(errs, field.Invalid(path.Index(i).Child("plugins", "queueSort"), curr, "has to match for all profiles"))
|
||||
errs = append(errs, field.Invalid(path.Index(i).Child("plugins", "queueSort"), curr, "queueSort must be the same for all profiles"))
|
||||
}
|
||||
for _, cfg := range profiles[i].PluginConfig {
|
||||
if cfg.Name == queueSortName && !cmp.Equal(queueSortArgs, cfg.Args) {
|
||||
errs = append(errs, field.Invalid(path.Index(i).Child("pluginConfig", "args"), cfg.Args, "has to match for all profiles"))
|
||||
errs = append(errs, field.Invalid(path.Index(i).Child("pluginConfig", "args"), cfg.Args, "queueSort must be the same for all profiles"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user