Skip to content

Commit

Permalink
return UnschedulableAndUnresolvable in PreFilter (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanposhiho authored Dec 27, 2023
1 parent 16cf558 commit bdf20c8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/scheduler_plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,7 @@ func (pl *KubeThrottler) PreFilter(
reasons = append(reasons, fmt.Sprintf("throttle[%s]=%s", schedulev1alpha1.CheckThrottleStatusInsufficient, strings.Join(throttleNames(thrInsufficient), ",")))
}

// 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...)
return nil, framework.NewStatus(framework.UnschedulableAndUnresolvable, reasons...)
}

func (pl *KubeThrottler) Reserve(
Expand Down

0 comments on commit bdf20c8

Please sign in to comment.