1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

fix priority threshold by name alone

This commit is contained in:
Lucas Severo Alves
2023-07-07 15:57:06 +02:00
parent ed1554dd19
commit 3ff38bab59
2 changed files with 75 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ import (
func ValidateDefaultEvictorArgs(obj runtime.Object) error {
args := obj.(*DefaultEvictorArgs)
if args.PriorityThreshold != nil && len(args.PriorityThreshold.Name) > 0 {
if args.PriorityThreshold != nil && args.PriorityThreshold.Value != nil && len(args.PriorityThreshold.Name) > 0 {
return fmt.Errorf("priority threshold misconfigured, only one of priorityThreshold fields can be set, got %v", args)
}