mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
fix: register Pod/Delete event at the preemption plugin
This commit is contained in:
parent
3124c5bd56
commit
677792663f
@ -116,7 +116,13 @@ func (pl *DefaultPreemption) PreEnqueue(ctx context.Context, p *v1.Pod) *framewo
|
||||
// EventsToRegister returns the possible events that may make a Pod
|
||||
// failed by this plugin schedulable.
|
||||
func (pl *DefaultPreemption) EventsToRegister(_ context.Context) ([]framework.ClusterEventWithHint, error) {
|
||||
return nil, nil
|
||||
return []framework.ClusterEventWithHint{
|
||||
// We don't need any QHint for the event
|
||||
// because the Pod rejected by the preemption plugin is the one that is running the preemption,
|
||||
// and the Pod won't be requeued until all the preemption API calls are completed
|
||||
// (we block the Pod from being requeued at PreEnqueue).
|
||||
{Event: framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.Delete}},
|
||||
}, nil
|
||||
}
|
||||
|
||||
// calculateNumCandidates returns the number of candidates the FindCandidates
|
||||
|
Loading…
Reference in New Issue
Block a user