Store a cluster event to plugin map in SchedulerQueue

This commit is contained in:
Wei Huang
2021-01-28 22:29:10 -08:00
parent 6404eda8de
commit f322019d7a
9 changed files with 546 additions and 53 deletions

View File

@@ -279,6 +279,16 @@ type QueueSortPlugin interface {
Less(*QueuedPodInfo, *QueuedPodInfo) bool
}
// EnqueueExtensions is an optional interface that plugins can implement to efficiently
// move unschedulable Pods in internal scheduling queues.
type EnqueueExtensions interface {
// EventsToRegister returns a series of interested events that
// will be registered when instantiating the internal scheduling queue.
// Note: the returned list needs to be static (not depend on configuration parameters);
// otherwise it would lead to undefined behavior.
EventsToRegister() []ClusterEvent
}
// PreFilterExtensions is an interface that is included in plugins that allow specifying
// callbacks to make incremental updates to its supposedly pre-calculated
// state.