kusciascheduling

package
v0.0.0-...-81cdc2d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Name is the name of the plugin used in Registry and configurations.
	Name = "KusciaScheduling"
)

Variables

This section is empty.

Functions

func New

func New(obj runtime.Object, handle framework.Handle) (framework.Plugin, error)

New initializes and returns a new KusciaScheduling plugin.

Types

type KusciaScheduling

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

KusciaScheduling is a plugin that schedules pods in a group.

func (*KusciaScheduling) EventsToRegister

func (cs *KusciaScheduling) EventsToRegister() []framework.ClusterEvent

func (*KusciaScheduling) Name

func (cs *KusciaScheduling) Name() string

Name returns name of the plugin. It is used in logs, etc.

func (*KusciaScheduling) Permit

func (cs *KusciaScheduling) Permit(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (*framework.Status, time.Duration)

Permit is the functions invoked by the framework at "Permit" extension point.

func (*KusciaScheduling) PostBind

func (cs *KusciaScheduling) PostBind(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeName string)

PostBind is called after a pod is successfully bound. These plugins are used update TaskResource when pod is bound.

func (*KusciaScheduling) PostFilter

func (cs *KusciaScheduling) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod,
	filteredNodeStatusMap framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status)

PostFilter is used to reject a group of pods if a pod does not pass PreFilter or Filter.

func (*KusciaScheduling) PreBind

func (cs *KusciaScheduling) PreBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status

PreBind is used to patch task resource status.

func (*KusciaScheduling) PreFilter

PreFilter performs the following validations. 1. Whether the TaskResourceGroup that the Pod belongs to is on the deny list. 2. Whether the total number of pods in a TaskResourceGroup is less than its `minReservedMember`.

func (*KusciaScheduling) PreFilterExtensions

func (cs *KusciaScheduling) PreFilterExtensions() framework.PreFilterExtensions

PreFilterExtensions returns a PreFilterExtensions interface if the plugin implements one.

func (*KusciaScheduling) Reserve

func (cs *KusciaScheduling) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status

Reserve is the functions invoked by the framework at "reserve" extension point.

func (*KusciaScheduling) Unreserve

func (cs *KusciaScheduling) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)

Unreserve rejects all other Pods in the TaskResource when one of the pods in the times out.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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