fix: not removing the plugin from the unsched plugins after PreEnqueue

This commit is contained in:
Kensei Nakada
2025-05-07 14:08:23 +02:00
parent 47d296d62d
commit d28c8cd488

View File

@@ -579,9 +579,7 @@ func (p *PriorityQueue) runPreEnqueuePlugin(ctx context.Context, logger klog.Log
p.metricsRecorder.ObservePluginDurationAsync(preEnqueue, pl.Name(), s.Code().String(), p.clock.Since(startTime).Seconds())
}
if s.IsSuccess() {
// This plugin passed, remove it from the unschedulable plugins.
// No need to change GatingPlugin; it's overwritten by the next PreEnqueue plugin if they gate this pod, or it's overwritten with an empty string if all PreEnqueue plugins pass.
pInfo.UnschedulablePlugins.Delete(pl.Name())
return s
}
pInfo.UnschedulablePlugins.Insert(pl.Name())