runtime

package
v0.0.0-...-dcfb068 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultGangTimeout = 5 * time.Minute

Functions

func New

func New(
	pluginRegistry framework.PluginMap,
	preemptionPluginRegistry framework.PluginMap,
	basePlugins *apis.BinderPluginCollection,
) framework.BinderFramework

New creates a new GodelBinderFramework, where pluginRegistry marks which plugins are supported, basePlugins presents which plugins are enabled by default. podConstraintConfigs are used in pod annotation, where hard constraint will be taken as filter plugins and soft constraint will be taken as score plugins. If plugin in podConstraintConfigs not exists in basePlugins, add this plugin to the new Godel Framework.

Types

type GodelFramework

type GodelFramework struct {
	// contains filtered or unexported fields
}

GodelFramework is the component responsible for initializing and running scheduler plugins, determining plugins to run in each scheduling phase(or extension point)

func (*GodelFramework) HasCheckConflictsPlugins

func (f *GodelFramework) HasCheckConflictsPlugins() bool

func (*GodelFramework) HasCheckTopologyPlugins

func (f *GodelFramework) HasCheckTopologyPlugins() bool

func (*GodelFramework) HasPlugin

func (f *GodelFramework) HasPlugin(pluginName string) bool

func (*GodelFramework) InitCycleState

func (f *GodelFramework) InitCycleState(pod *v1.Pod) (*framework.CycleState, error)

func (*GodelFramework) ListPlugins

func (f *GodelFramework) ListPlugins() map[string]sets.String

func (*GodelFramework) RunBindPlugins

func (f *GodelFramework) RunBindPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (status *framework.Status)

RunBindPlugins runs the set of configured bind plugins until one returns a non `Skip` status.

func (*GodelFramework) RunCheckConflictsPlugins

func (f *GodelFramework) RunCheckConflictsPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo framework.NodeInfo) framework.PluginToStatus

func (*GodelFramework) RunCheckTopologyPlugins

func (f *GodelFramework) RunCheckTopologyPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo framework.NodeInfo) framework.PluginToStatus

func (*GodelFramework) RunClusterPrePreemptingPlugins

func (f *GodelFramework) RunClusterPrePreemptingPlugins(preemptor *v1.Pod, state, commonState *framework.CycleState) *framework.Status

func (*GodelFramework) RunPermitPlugins

func (f *GodelFramework) RunPermitPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (status *framework.Status)

RunPermitPlugins runs the set of configured permit plugins. If any of these plugins returns a status other than "Success" or "Wait", it does not continue running the remaining plugins and returns an error. Otherwise, if any of the plugins returns "Wait", then this function will create and add waiting pod to a map of currently waiting pods and return status with "Wait" code. Pod will remain waiting pod for the minimum duration returned by the permit plugins.

func (*GodelFramework) RunPostBindPlugins

func (f *GodelFramework) RunPostBindPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)

RunPostBindPlugins runs the set of configured postbind plugins.

func (*GodelFramework) RunPostVictimCheckingPlugins

func (f *GodelFramework) RunPostVictimCheckingPlugins(preemptor, pod *v1.Pod, state, commonState *framework.CycleState) *framework.Status

func (*GodelFramework) RunPreBindPlugins

func (f *GodelFramework) RunPreBindPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (status *framework.Status)

RunPreBindPlugins runs the set of configured binder plugins. It returns a failure (bool) if any of the plugins returns an error. It also returns an error containing the rejection message or the error occurred in the plugin.

func (*GodelFramework) RunReservePluginsReserve

func (f *GodelFramework) RunReservePluginsReserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (status *framework.Status)

RunReservePluginsReserve runs the Reserve method in the set of configured reserve plugins. If any of these plugins returns an error, it does not continue running the remaining ones and returns the error. In such a case, the pod will not be scheduled and the caller will be expected to call RunReservePluginsUnreserve.

func (*GodelFramework) RunReservePluginsUnreserve

func (f *GodelFramework) RunReservePluginsUnreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)

RunReservePluginsUnreserve runs the Unreserve method in the set of configured reserve plugins.

func (*GodelFramework) RunVictimCheckingPlugins

func (f *GodelFramework) RunVictimCheckingPlugins(preemptor, pod *v1.Pod, state, commonState *framework.CycleState) *framework.Status

func (*GodelFramework) WaitOnPermit

func (f *GodelFramework) WaitOnPermit(ctx context.Context, pod *v1.Pod) (status *framework.Status)

WaitOnPermit will block, if the pod is a waiting pod, until the waiting pod is rejected or allowed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL