plugin

package
v1.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SchedulerPluginName = "YuniKornPlugin"
)

Variables

This section is empty.

Functions

func NewSchedulerPlugin

func NewSchedulerPlugin(_ context.Context, _ runtime.Object, handle framework.Handle) (framework.Plugin, error)

NewSchedulerPlugin initializes a new plugin and returns it

Types

type YuniKornSchedulerPlugin

type YuniKornSchedulerPlugin struct {
	locking.RWMutex
	// contains filtered or unexported fields
}

YuniKornSchedulerPlugin provides an implementation of several lifecycle methods of the Kubernetes scheduling framework:

https://kubernetes.io/docs/concepts/scheduling-eviction/scheduling-framework/

PreFilter: Used to notify the default scheduler that a particular pod has been marked ready for scheduling by YuniKorn

Filter: Used to notify the default scheduler that a particular pod/node combination is ready to be scheduled

PostBind: Used to notify YuniKorn that a pod has been scheduled successfully

Pod Allocations:

The YuniKorn scheduler is always running in the background, making decisions about which pods to allocate to which nodes. When a decision is made, that pod is marked as having a "pending" pod allocation, which means YuniKorn has allocated the pod, but the default scheduler (via the plugin interface) has not yet been notified.

Once PreFilter() has been called for a particular pod, that allocation is marked as "in progress" meaning it has been communicated to the default scheduler, but has not yet been fulfilled.

Finally, in PostBind(), the allocation is removed as we now know that the pod has been allocated successfully. If a pending or in-progress allocation is detected for a pod in PreFilter(), we remove the allocation and force the pod to be rescheduled, as this means the prior allocation could not be completed successfully by the default scheduler for some reason.

func (*YuniKornSchedulerPlugin) EventsToRegister

func (sp *YuniKornSchedulerPlugin) EventsToRegister() []framework.ClusterEventWithHint

func (*YuniKornSchedulerPlugin) Filter

Filter is used to release specific pod/node combinations to scheduler

func (*YuniKornSchedulerPlugin) Name

func (sp *YuniKornSchedulerPlugin) Name() string

Name returns the name of the plugin

func (*YuniKornSchedulerPlugin) PostBind

func (sp *YuniKornSchedulerPlugin) PostBind(_ context.Context, _ *framework.CycleState, pod *v1.Pod, nodeName string)

PostBind is used to mark allocations as completed once scheduling run is finished

func (*YuniKornSchedulerPlugin) PreEnqueue

func (sp *YuniKornSchedulerPlugin) PreEnqueue(_ context.Context, pod *v1.Pod) *framework.Status

PreEnqueue is called prior to adding Pods to activeQ

func (*YuniKornSchedulerPlugin) PreFilter

PreFilter is used to release pods to scheduler

func (*YuniKornSchedulerPlugin) PreFilterExtensions

func (sp *YuniKornSchedulerPlugin) PreFilterExtensions() framework.PreFilterExtensions

PreFilterExtensions is unused

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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