diff --git a/pkg/scheduler_plugin/plugin.go b/pkg/scheduler_plugin/plugin.go index 81eeca8..66d0d0a 100644 --- a/pkg/scheduler_plugin/plugin.go +++ b/pkg/scheduler_plugin/plugin.go @@ -211,7 +211,11 @@ func (pl *KubeThrottler) PreFilter( if len(thrInsufficient) != 0 { reasons = append(reasons, fmt.Sprintf("throttle[%s]=%s", schedulev1alpha1.CheckThrottleStatusInsufficient, strings.Join(throttleNames(thrInsufficient), ","))) } - return nil, framework.NewStatus(framework.UnschedulableAndUnresolvable, reasons...) + + // TODO(utam0k): Returns a more appropriate type. + // If PreFilter returns Unschedulable or UnschedulableAndUnresolvable, preemption will occur. + // ref: https://github.com/kubernetes/kubernetes/blob/8a9b209cb11943f4d53a0d840b55cf92ebfbe004/pkg/scheduler/schedule_one.go#L452-L468 + return nil, framework.NewStatus(framework.Error, reasons...) } func (pl *KubeThrottler) Reserve(