reservation

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "Reservation"

	// ErrReasonNodeNotMatchReservation is the reason for node not matching which the reserve pod specifies.
	ErrReasonNodeNotMatchReservation = "node(s) didn't match the nodeName specified by reservation"
	// ErrReasonOnlyOneSameReusableReservationOnSameNode is the reason for only one same reusable reservation can be scheduled on a same node
	ErrReasonOnlyOneSameReusableReservationOnSameNode = "node(s) only one same reusable reservation can be scheduled on a same node"
	// ErrReasonReservationInactive is the reason for the reservation is failed/succeeded and should not be used.
	ErrReasonReservationInactive = "reservation is not active"
)

Variables

This section is empty.

Functions

func New

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

Types

type Plugin

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

func (*Plugin) AfterPreFilter added in v1.2.0

func (pl *Plugin) AfterPreFilter(_ frameworkext.ExtendedHandle, cycleState *framework.CycleState, pod *corev1.Pod) error

func (*Plugin) BeforeFilter added in v1.2.0

func (pl *Plugin) BeforeFilter(handle frameworkext.ExtendedHandle, cycleState *framework.CycleState, pod *corev1.Pod, nodeInfo *framework.NodeInfo) (*corev1.Pod, *framework.NodeInfo, bool)

func (*Plugin) BeforePreFilter added in v1.2.0

func (pl *Plugin) BeforePreFilter(_ frameworkext.ExtendedHandle, cycleState *framework.CycleState, pod *corev1.Pod) (*corev1.Pod, bool)

func (*Plugin) Bind

func (pl *Plugin) Bind(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status

Bind fake binds reserve pod and mark corresponding reservation as Available. NOTE: This Bind plugin should get called before DefaultBinder; plugin order should be configured.

func (*Plugin) Filter

func (pl *Plugin) Filter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeInfo *framework.NodeInfo) *framework.Status

Filter only processes pods either the pod is a reserve pod or a pod can allocate reserved resources on the node.

func (*Plugin) FilterReservation added in v1.2.0

func (pl *Plugin) FilterReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, reservation *schedulingv1alpha1.Reservation, nodeName string) *framework.Status

func (*Plugin) Name

func (pl *Plugin) Name() string

func (*Plugin) NewControllers added in v1.2.0

func (pl *Plugin) NewControllers() ([]frameworkext.Controller, error)

func (*Plugin) NominateReservation added in v1.2.0

func (pl *Plugin) NominateReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) (*schedulingv1alpha1.Reservation, *framework.Status)

func (*Plugin) NormalizeScore added in v0.7.0

func (pl *Plugin) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, scores framework.NodeScoreList) *framework.Status

func (*Plugin) PostFilter

func (*Plugin) PreBind

func (pl *Plugin) PreBind(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status

func (*Plugin) PreFilter

func (pl *Plugin) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) *framework.Status

PreFilter checks if the pod is a reserve pod. If it is, update cycle state to annotate reservation scheduling. Also do validations in this phase.

func (*Plugin) PreFilterExtensions

func (pl *Plugin) PreFilterExtensions() framework.PreFilterExtensions

func (*Plugin) PreScore added in v0.7.0

func (pl *Plugin) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodes []*corev1.Node) *framework.Status

func (*Plugin) Reserve

func (pl *Plugin) Reserve(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status

func (*Plugin) Score

func (pl *Plugin) Score(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) (int64, *framework.Status)

func (*Plugin) ScoreExtensions

func (pl *Plugin) ScoreExtensions() framework.ScoreExtensions

func (*Plugin) ScoreReservation added in v1.2.0

func (pl *Plugin) ScoreReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, reservation *schedulingv1alpha1.Reservation, nodeName string) (int64, *framework.Status)

func (*Plugin) Unreserve

func (pl *Plugin) Unreserve(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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