mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
PreEnqueue implementation
- Add PreEnqueuePlugin to Scheduler Framework - Implement PreEnqueuePlugin in scheduler queue - Implementation of SchedulingGates plugin - Metrics
This commit is contained in:
@@ -75,6 +75,7 @@ type frameworkImpl struct {
|
||||
snapshotSharedLister framework.SharedLister
|
||||
waitingPods *waitingPodsMap
|
||||
scorePluginWeight map[string]int
|
||||
preEnqueuePlugins []framework.PreEnqueuePlugin
|
||||
queueSortPlugins []framework.QueueSortPlugin
|
||||
preFilterPlugins []framework.PreFilterPlugin
|
||||
filterPlugins []framework.FilterPlugin
|
||||
@@ -125,6 +126,7 @@ func (f *frameworkImpl) getExtensionPoints(plugins *config.Plugins) []extensionP
|
||||
{&plugins.Bind, &f.bindPlugins},
|
||||
{&plugins.PostBind, &f.postBindPlugins},
|
||||
{&plugins.Permit, &f.permitPlugins},
|
||||
{&plugins.PreEnqueue, &f.preEnqueuePlugins},
|
||||
{&plugins.QueueSort, &f.queueSortPlugins},
|
||||
}
|
||||
}
|
||||
@@ -574,6 +576,11 @@ func updatePluginList(pluginList interface{}, pluginSet config.PluginSet, plugin
|
||||
return nil
|
||||
}
|
||||
|
||||
// EnqueuePlugins returns the registered enqueue plugins.
|
||||
func (f *frameworkImpl) PreEnqueuePlugins() []framework.PreEnqueuePlugin {
|
||||
return f.preEnqueuePlugins
|
||||
}
|
||||
|
||||
// QueueSortFunc returns the function to sort pods in scheduling queue
|
||||
func (f *frameworkImpl) QueueSortFunc() framework.LessFunc {
|
||||
if f == nil {
|
||||
|
||||
Reference in New Issue
Block a user