More understandable error for scheduler configuration validation
Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
		| @@ -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")) | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 kerthcet
					kerthcet