frameworkext

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxReservationScore is the maximum score a ReservationScorePlugin plugin is expected to return.
	MaxReservationScore int64 = 100

	// MinReservationScore is the minimum score a ReservationScorePlugin plugin is expected to return.
	MinReservationScore int64 = 0
)

Variables

View Source
var AssignedPodDelete = framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.Delete, Label: "AssignedPodDelete"}

Functions

func AddFlags added in v0.7.0

func AddFlags(fs *pflag.FlagSet)

func DebugFiltersSetter added in v1.1.0

func DebugFiltersSetter(val string) (string, error)

DebugFiltersSetter updates debugFilterFailure to specified value

func DebugScoresSetter added in v0.7.0

func DebugScoresSetter(val string) (string, error)

DebugScoresSetter updates debugTopNScores to specified value

func DefaultReservationNormalizeScore added in v1.4.0

func DefaultReservationNormalizeScore(maxPriority int64, reverse bool, scores ReservationScoreList) *framework.Status

DefaultReservationNormalizeScore generates a Normalize Score function that can normalize the scores to [0, maxPriority]. If reverse is set to true, it reverses the scores by subtracting it from maxPriority.

func PluginFactoryProxy

func PluginFactoryProxy(extenderFactory *FrameworkExtenderFactory, factoryFn frameworkruntime.PluginFactory) frameworkruntime.PluginFactory

PluginFactoryProxy is used to proxy the call to the PluginFactory function and pass in the ExtendedHandle for the custom plugin

func SetupCustomInformers added in v1.3.0

func SetupCustomInformers(informerFactory informers.SharedInformerFactory)

Types

type Controller added in v1.0.0

type Controller interface {
	Start()
	Name() string
}

type ControllerProvider added in v1.0.0

type ControllerProvider interface {
	NewControllers() ([]Controller, error)
}

type ControllersMap added in v1.0.0

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

func NewControllersMap added in v1.0.0

func NewControllersMap() *ControllersMap

func (*ControllersMap) RegisterControllers added in v1.0.0

func (cm *ControllersMap) RegisterControllers(plugin framework.Plugin)

func (*ControllersMap) Start added in v1.0.0

func (cm *ControllersMap) Start()

type ExtendedHandle

type ExtendedHandle interface {
	framework.Handle
	// Scheduler return the scheduler adapter to support operating with cache and schedulingQueue.
	// NOTE: Plugins do not acquire a dispatcher instance during plugin initialization,
	// nor are they allowed to hold the object within the plugin object.
	Scheduler() Scheduler
	KoordinatorClientSet() koordinatorclientset.Interface
	KoordinatorSharedInformerFactory() koordinatorinformers.SharedInformerFactory
	// RegisterErrorHandlerFilters supports registering custom PreErrorHandlerFilter and PostErrorHandlerFilter to intercept scheduling errors.
	// If PreErrorHandlerFilter returns true, the k8s scheduler's default error handler and other handlers will not be called.
	// After handling scheduling errors, will execute PostErrorHandlerFilter, and if return true, other custom handlers will not be called.
	RegisterErrorHandlerFilters(preFilter PreErrorHandlerFilter, afterFilter PostErrorHandlerFilter)
	RegisterForgetPodHandler(handler ForgetPodHandler)
	ForgetPod(logger klog.Logger, pod *corev1.Pod) error
	GetReservationNominator() ReservationNominator
}

ExtendedHandle extends the k8s scheduling framework Handle interface to facilitate plugins to access Koordinator's resources and states.

type FakeQueue added in v1.3.0

type FakeQueue struct {
	Pods                map[string]*corev1.Pod
	UnschedulablePods   map[string]*corev1.Pod
	AssignedPods        map[string]*corev1.Pod
	AssignedUpdatedPods map[string]*corev1.Pod
}

func (*FakeQueue) Add added in v1.3.0

func (f *FakeQueue) Add(logger klog.Logger, pod *corev1.Pod) error

func (*FakeQueue) AddUnschedulableIfNotPresent added in v1.3.0

func (f *FakeQueue) AddUnschedulableIfNotPresent(logger klog.Logger, pod *framework.QueuedPodInfo, podSchedulingCycle int64) error

func (*FakeQueue) AssignedPodAdded added in v1.3.0

func (f *FakeQueue) AssignedPodAdded(logger klog.Logger, pod *corev1.Pod)

func (*FakeQueue) AssignedPodUpdated added in v1.3.0

func (f *FakeQueue) AssignedPodUpdated(logger klog.Logger, oldPod, newPod *corev1.Pod)

func (*FakeQueue) Delete added in v1.3.0

func (f *FakeQueue) Delete(pod *corev1.Pod) error

func (*FakeQueue) MoveAllToActiveOrBackoffQueue added in v1.3.0

func (f *FakeQueue) MoveAllToActiveOrBackoffQueue(logger klog.Logger, event framework.ClusterEvent, oldObj, newObj interface{}, preCheck PreEnqueueCheck)

func (*FakeQueue) SchedulingCycle added in v1.3.0

func (f *FakeQueue) SchedulingCycle() int64

func (*FakeQueue) Update added in v1.3.0

func (f *FakeQueue) Update(logger klog.Logger, oldPod, newPod *corev1.Pod) error

type FakeScheduler added in v1.3.0

type FakeScheduler struct {
	Pods       map[string]*corev1.Pod
	AssumedPod map[string]*corev1.Pod
	Queue      *FakeQueue

	NodeInfos map[string]*framework.NodeInfo
	// contains filtered or unexported fields
}

func NewFakeScheduler added in v1.3.0

func NewFakeScheduler() *FakeScheduler

func (*FakeScheduler) AddPod added in v1.3.0

func (f *FakeScheduler) AddPod(logger klog.Logger, pod *corev1.Pod) error

func (*FakeScheduler) AssumePod added in v1.3.0

func (f *FakeScheduler) AssumePod(logger klog.Logger, pod *corev1.Pod) error

func (*FakeScheduler) ForgetPod added in v1.3.0

func (f *FakeScheduler) ForgetPod(logger klog.Logger, pod *corev1.Pod) error

func (*FakeScheduler) GetCache added in v1.3.0

func (f *FakeScheduler) GetCache() SchedulerCache

func (*FakeScheduler) GetPod added in v1.3.0

func (f *FakeScheduler) GetPod(pod *corev1.Pod) (*corev1.Pod, error)

func (*FakeScheduler) GetSchedulingQueue added in v1.3.0

func (f *FakeScheduler) GetSchedulingQueue() SchedulingQueue

func (*FakeScheduler) InvalidNodeInfo added in v1.3.0

func (f *FakeScheduler) InvalidNodeInfo(logger klog.Logger, nodeName string) error

func (*FakeScheduler) IsAssumedPod added in v1.3.0

func (f *FakeScheduler) IsAssumedPod(pod *corev1.Pod) (bool, error)

func (*FakeScheduler) RemovePod added in v1.3.0

func (f *FakeScheduler) RemovePod(logger klog.Logger, pod *corev1.Pod) error

func (*FakeScheduler) UpdatePod added in v1.3.0

func (f *FakeScheduler) UpdatePod(logger klog.Logger, oldPod, newPod *corev1.Pod) error

type FilterTransformer added in v1.2.0

type FilterTransformer interface {
	SchedulingTransformer
	BeforeFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeInfo *framework.NodeInfo) (*corev1.Pod, *framework.NodeInfo, bool, *framework.Status)
}

FilterTransformer is executed before Filter.

type ForgetPodHandler added in v1.3.0

type ForgetPodHandler func(pod *corev1.Pod)

type FrameworkExtender added in v0.6.0

type FrameworkExtender interface {
	framework.Framework
	ExtendedHandle

	SetConfiguredPlugins(plugins *schedconfig.Plugins)

	RunReservationExtensionPreRestoreReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) *framework.Status
	RunReservationExtensionRestoreReservation(ctx context.Context, cycleState *framework.CycleState, podToSchedule *corev1.Pod, matched []*ReservationInfo, unmatched []*ReservationInfo, nodeInfo *framework.NodeInfo) (PluginToReservationRestoreStates, *framework.Status)
	RunReservationExtensionFinalRestoreReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, states PluginToNodeReservationRestoreStates) *framework.Status

	RunReservationFilterPlugins(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, reservationInfo *ReservationInfo, nodeName string) *framework.Status
	RunReservationScorePlugins(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, reservationInfos []*ReservationInfo, nodeName string) (PluginToReservationScores, *framework.Status)

	RunNUMATopologyManagerAdmit(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string, numaNodes []int, policyType apiext.NUMATopologyPolicy, exclusivePolicy apiext.NumaTopologyExclusive, allNUMANodeStatus []apiext.NumaNodeStatus) *framework.Status

	RunResizePod(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status
}

FrameworkExtender extends the K8s Scheduling Framework interface to provide more extension methods to support Koordinator.

func NewFrameworkExtender added in v1.2.0

type FrameworkExtenderFactory added in v0.6.0

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

func NewFrameworkExtenderFactory added in v0.6.0

func NewFrameworkExtenderFactory(options ...Option) (*FrameworkExtenderFactory, error)

func (FrameworkExtenderFactory) Error added in v1.3.0

func (d FrameworkExtenderFactory) Error(ctx context.Context, fwk framework.Framework, podInfo *framework.QueuedPodInfo, status *framework.Status, nominatingInfo *framework.NominatingInfo, start time.Time)

func (*FrameworkExtenderFactory) GetExtender added in v1.2.0

func (f *FrameworkExtenderFactory) GetExtender(profileName string) FrameworkExtender

func (*FrameworkExtenderFactory) InitScheduler added in v1.3.0

func (f *FrameworkExtenderFactory) InitScheduler(sched Scheduler)

func (*FrameworkExtenderFactory) InterceptSchedulerError added in v1.3.0

func (f *FrameworkExtenderFactory) InterceptSchedulerError(sched *scheduler.Scheduler)

func (*FrameworkExtenderFactory) KoordinatorClientSet added in v1.2.0

func (f *FrameworkExtenderFactory) KoordinatorClientSet() koordinatorclientset.Interface

func (*FrameworkExtenderFactory) KoordinatorSharedInformerFactory added in v1.2.0

func (f *FrameworkExtenderFactory) KoordinatorSharedInformerFactory() koordinatorinformers.SharedInformerFactory

func (*FrameworkExtenderFactory) NewFrameworkExtender added in v1.2.0

func (f *FrameworkExtenderFactory) NewFrameworkExtender(fw framework.Framework) FrameworkExtender

func (FrameworkExtenderFactory) RegisterErrorHandlerFilters added in v1.4.0

func (d FrameworkExtenderFactory) RegisterErrorHandlerFilters(preFilter PreErrorHandlerFilter, postFilter PostErrorHandlerFilter)

func (*FrameworkExtenderFactory) Run added in v1.2.0

func (f *FrameworkExtenderFactory) Run()

func (*FrameworkExtenderFactory) Scheduler added in v1.3.0

func (f *FrameworkExtenderFactory) Scheduler() Scheduler

Scheduler return the scheduler adapter to support operating with cache and schedulingQueue. NOTE: Plugins do not acquire a dispatcher instance during plugin initialization, nor are they allowed to hold the object within the plugin object.

type NodeReservationRestoreStates added in v1.3.0

type NodeReservationRestoreStates map[string]interface{}

NodeReservationRestoreStates declares a map from plugin name to its ReservationRestoreState.

type Option added in v0.5.0

type Option func(*extendedHandleOptions)

func WithKoordinatorClientSet added in v0.5.0

func WithKoordinatorClientSet(koordinatorClientSet koordinatorclientset.Interface) Option

func WithKoordinatorSharedInformerFactory added in v0.5.0

func WithKoordinatorSharedInformerFactory(informerFactory koordinatorinformers.SharedInformerFactory) Option

func WithReservationNominator added in v1.4.0

func WithReservationNominator(nominator ReservationNominator) Option

func WithServicesEngine added in v0.7.0

func WithServicesEngine(engine *services.Engine) Option

type PluginToNodeReservationRestoreStates added in v1.3.0

type PluginToNodeReservationRestoreStates map[string]NodeReservationRestoreStates

PluginToNodeReservationRestoreStates declares a map from plugin name to its NodeReservationRestoreStates.

type PluginToReservationRestoreStates added in v1.3.0

type PluginToReservationRestoreStates map[string]interface{}

PluginToReservationRestoreStates declares a map from plugin name to its ReservationRestoreState.

type PluginToReservationScores added in v1.2.0

type PluginToReservationScores map[string]ReservationScoreList

PluginToReservationScores declares a map from plugin name to its ReservationScoreList.

type PodRequirement added in v1.3.0

type PodRequirement struct {
	Namespace string
	Name      string
	UID       types.UID
	Requests  corev1.ResourceList
	Ports     framework.HostPortInfo
}

func NewPodRequirement added in v1.3.0

func NewPodRequirement(pod *corev1.Pod) *PodRequirement

func (*PodRequirement) Clone added in v1.3.0

func (p *PodRequirement) Clone() *PodRequirement

type PostErrorHandlerFilter added in v1.4.0

type PostErrorHandlerFilter PreErrorHandlerFilter

type PreBindExtensions added in v1.3.0

type PreBindExtensions interface {
	framework.Plugin
	ApplyPatch(ctx context.Context, cycleState *framework.CycleState, originalObj, modifiedObj metav1.Object) *framework.Status
}

PreBindExtensions is an extension to PreBind, which supports converting multiple modifications to the same object into a Patch operation. It supports configuring multiple plugin instances. A certain instance can be skipped if it does not need to be processed. Once a plugin instance returns success or failure, the process ends.

type PreEnqueueCheck added in v1.4.0

type PreEnqueueCheck func(pod *corev1.Pod) bool

type PreErrorHandlerFilter added in v1.4.0

type PreErrorHandlerFilter func(ctx context.Context, fwk framework.Framework, podInfo *framework.QueuedPodInfo, status *framework.Status, nominatingInfo *framework.NominatingInfo, start time.Time) bool

type PreFilterTransformer added in v1.2.0

type PreFilterTransformer interface {
	SchedulingTransformer
	// BeforePreFilter If there is a change to the incoming Pod, it needs to be modified after DeepCopy and returned.
	BeforePreFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) (*corev1.Pod, bool, *framework.Status)
	// AfterPreFilter is executed after PreFilter.
	// There is a chance to trigger the correction of the State data of each plugin after the PreFilter.
	AfterPreFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) *framework.Status
}

PreFilterTransformer is executed before and after PreFilter.

type ReservationFilterPlugin added in v1.2.0

type ReservationFilterPlugin interface {
	framework.Plugin
	FilterReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, reservationInfo *ReservationInfo, nodeName string) *framework.Status
}

ReservationFilterPlugin is an interface for Filter Reservation plugins. These plugins will be called during the Reserve phase to determine whether the Reservation can participate in the Reserve

type ReservationInfo added in v1.3.0

type ReservationInfo struct {
	Reservation      *schedulingv1alpha1.Reservation
	Pod              *corev1.Pod
	ResourceNames    []corev1.ResourceName
	Allocatable      corev1.ResourceList
	Allocated        corev1.ResourceList
	AllocatablePorts framework.HostPortInfo
	AllocatedPorts   framework.HostPortInfo
	AssignedPods     map[types.UID]*PodRequirement
	OwnerMatchers    []reservationutil.ReservationOwnerMatcher
	ParseError       error
}

func NewReservationInfo added in v1.3.0

func NewReservationInfo(r *schedulingv1alpha1.Reservation) *ReservationInfo

func NewReservationInfoFromPod added in v1.3.0

func NewReservationInfoFromPod(pod *corev1.Pod) *ReservationInfo

func (*ReservationInfo) AddAssignedPod added in v1.3.0

func (ri *ReservationInfo) AddAssignedPod(pod *corev1.Pod)

func (*ReservationInfo) Clone added in v1.3.0

func (ri *ReservationInfo) Clone() *ReservationInfo

func (*ReservationInfo) GetAllocatePolicy added in v1.3.0

func (*ReservationInfo) GetName added in v1.3.0

func (ri *ReservationInfo) GetName() string

func (*ReservationInfo) GetNamespace added in v1.3.0

func (ri *ReservationInfo) GetNamespace() string

func (*ReservationInfo) GetNodeName added in v1.3.0

func (ri *ReservationInfo) GetNodeName() string

func (*ReservationInfo) GetObject added in v1.3.0

func (ri *ReservationInfo) GetObject() metav1.Object

func (*ReservationInfo) GetPodOwners added in v1.3.0

func (*ReservationInfo) GetPriority added in v1.3.0

func (ri *ReservationInfo) GetPriority() int32

func (*ReservationInfo) GetReservePod added in v1.3.0

func (ri *ReservationInfo) GetReservePod() *corev1.Pod

func (*ReservationInfo) IsAllocateOnce added in v1.3.0

func (ri *ReservationInfo) IsAllocateOnce() bool

func (*ReservationInfo) IsAvailable added in v1.3.0

func (ri *ReservationInfo) IsAvailable() bool

func (*ReservationInfo) IsTerminating added in v1.3.0

func (ri *ReservationInfo) IsTerminating() bool

func (*ReservationInfo) IsUnschedulable added in v1.3.0

func (ri *ReservationInfo) IsUnschedulable() bool

func (*ReservationInfo) Match added in v1.4.0

func (ri *ReservationInfo) Match(pod *corev1.Pod) bool

func (*ReservationInfo) RemoveAssignedPod added in v1.3.0

func (ri *ReservationInfo) RemoveAssignedPod(pod *corev1.Pod)

func (*ReservationInfo) UID added in v1.3.0

func (ri *ReservationInfo) UID() types.UID

func (*ReservationInfo) UpdatePod added in v1.3.0

func (ri *ReservationInfo) UpdatePod(pod *corev1.Pod)

func (*ReservationInfo) UpdateReservation added in v1.3.0

func (ri *ReservationInfo) UpdateReservation(r *schedulingv1alpha1.Reservation)

type ReservationNominator added in v1.2.0

type ReservationNominator interface {
	framework.Plugin
	NominateReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) (*ReservationInfo, *framework.Status)
	AddNominatedReservation(pod *corev1.Pod, nodeName string, rInfo *ReservationInfo)
	RemoveNominatedReservations(pod *corev1.Pod)
	GetNominatedReservation(pod *corev1.Pod, nodeName string) *ReservationInfo
	AddNominatedReservePod(reservePod *corev1.Pod, nodeName string)
	DeleteNominatedReservePod(reservePod *corev1.Pod)
}

ReservationNominator nominates a more suitable Reservation in the Reserve stage and Pod will bind this Reservation. The Reservation will be recorded in CycleState through SetNominatedReservation. When executing Reserve, each plugin will obtain the currently used Reservation through GetNominatedReservation, and locate the previously returned reusable resources for Pod allocation.

type ReservationPreBindPlugin added in v1.2.0

type ReservationPreBindPlugin interface {
	framework.Plugin
	PreBindReservation(ctx context.Context, cycleState *framework.CycleState, reservation *schedulingv1alpha1.Reservation, nodeName string) *framework.Status
}

ReservationPreBindPlugin performs special binding logic specifically for Reservation in the PreBind phase. Similar to the built-in VolumeBinding plugin of kube-scheduler, it does not support Reservation, and how Reservation itself uses PVC reserved resources also needs special handling. In addition, implementing this interface can clearly indicate that the plugin supports Reservation.

type ReservationRestorePlugin added in v1.3.0

type ReservationRestorePlugin interface {
	framework.Plugin
	PreRestoreReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) *framework.Status
	RestoreReservation(ctx context.Context, cycleState *framework.CycleState, podToSchedule *corev1.Pod, matched []*ReservationInfo, unmatched []*ReservationInfo, nodeInfo *framework.NodeInfo) (interface{}, *framework.Status)
	FinalRestoreReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, states NodeReservationRestoreStates) *framework.Status
}

ReservationRestorePlugin is used to support the return of fine-grained resources held by Reservation, such as CPU Cores, GPU Devices, etc. During Pod scheduling, resources held by these reservations need to be allocated first, otherwise resources will be wasted.

type ReservationScore added in v1.2.0

type ReservationScore struct {
	Name      string
	Namespace string
	UID       types.UID
	Score     int64
}

ReservationScore is a struct with reservation name and score.

type ReservationScoreExtensions added in v1.4.0

type ReservationScoreExtensions interface {
	// NormalizeReservationScore is called for all node scores produced by the same plugin's "ScoreReservation"
	// method. A successful run of NormalizeReservationScore will update the scores list and return
	// a success status.
	NormalizeReservationScore(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, scores ReservationScoreList) *framework.Status
}

ReservationScoreExtensions is an interface for Score extended functionality.

type ReservationScoreList added in v1.2.0

type ReservationScoreList []ReservationScore

ReservationScoreList declares a list of reservations and their scores.

type ReservationScorePlugin added in v1.2.0

type ReservationScorePlugin interface {
	framework.Plugin
	ScoreReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, reservationInfo *ReservationInfo, nodeName string) (int64, *framework.Status)
	// ReservationScoreExtensions returns a ReservationScoreExtensions interface if it implements one, or nil if does not.
	ReservationScoreExtensions() ReservationScoreExtensions
}

ReservationScorePlugin is an interface that must be implemented by "ScoreReservation" plugins to rank reservations that passed the reserve phase.

type ResizePodPlugin added in v1.4.0

type ResizePodPlugin interface {
	ResizePod(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status
}

ResizePodPlugin is an interface that resize the pod resource spec after reserve. If you want to use the feature, must enable the feature gate ResizePod=true

type Scheduler added in v1.3.0

type Scheduler interface {
	GetCache() SchedulerCache
	GetSchedulingQueue() SchedulingQueue
}

Scheduler exports scheduler internal cache and queue interface for testability.

type SchedulerAdapter added in v1.3.0

type SchedulerAdapter struct {
	Scheduler *scheduler.Scheduler
}

func (*SchedulerAdapter) GetCache added in v1.3.0

func (s *SchedulerAdapter) GetCache() SchedulerCache

func (*SchedulerAdapter) GetSchedulingQueue added in v1.3.0

func (s *SchedulerAdapter) GetSchedulingQueue() SchedulingQueue

func (*SchedulerAdapter) MoveAllToActiveOrBackoffQueue added in v1.3.0

func (s *SchedulerAdapter) MoveAllToActiveOrBackoffQueue(logger klog.Logger, event framework.ClusterEvent, oldObj, newObj interface{}, preCheck PreEnqueueCheck)

type SchedulerCache added in v1.3.0

type SchedulerCache interface {
	AddPod(logger klog.Logger, pod *corev1.Pod) error
	UpdatePod(logger klog.Logger, oldPod, newPod *corev1.Pod) error
	RemovePod(logger klog.Logger, pod *corev1.Pod) error
	AssumePod(logger klog.Logger, pod *corev1.Pod) error
	IsAssumedPod(pod *corev1.Pod) (bool, error)
	GetPod(pod *corev1.Pod) (*corev1.Pod, error)
	ForgetPod(logger klog.Logger, pod *corev1.Pod) error
	InvalidNodeInfo(logger klog.Logger, nodeName string) error
}

type SchedulerMonitor added in v1.4.0

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

func NewSchedulerMonitor added in v1.4.0

func NewSchedulerMonitor(period time.Duration, timeout time.Duration) *SchedulerMonitor

func (*SchedulerMonitor) Complete added in v1.4.0

func (m *SchedulerMonitor) Complete(pod *corev1.Pod)

func (*SchedulerMonitor) StartMonitoring added in v1.4.0

func (m *SchedulerMonitor) StartMonitoring(pod *corev1.Pod)

type SchedulingQueue added in v1.3.0

type SchedulingQueue interface {
	Add(logger klog.Logger, pod *corev1.Pod) error
	Update(logger klog.Logger, oldPod, newPod *corev1.Pod) error
	Delete(pod *corev1.Pod) error
	AddUnschedulableIfNotPresent(logger klog.Logger, pod *framework.QueuedPodInfo, podSchedulingCycle int64) error
	SchedulingCycle() int64
	AssignedPodAdded(logger klog.Logger, pod *corev1.Pod)
	AssignedPodUpdated(logger klog.Logger, oldPod, newPod *corev1.Pod)
	MoveAllToActiveOrBackoffQueue(logger klog.Logger, event framework.ClusterEvent, oldObj, newObj interface{}, preCheck PreEnqueueCheck)
}

type SchedulingTransformer added in v1.2.0

type SchedulingTransformer interface {
	Name() string
}

SchedulingTransformer is the parent type for all the custom transformer plugins.

type ScoreTransformer added in v1.2.0

type ScoreTransformer interface {
	SchedulingTransformer
	BeforeScore(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodes []*corev1.Node) (*corev1.Pod, []*corev1.Node, bool, *framework.Status)
}

ScoreTransformer is executed before Score.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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