nodezone

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name of the plugin used in the plugin registry and configurations.
	Name = "NodeZone"

	// AvailableZones is the number failure domains over which we should spread.
	AvailableZones = 3

	// WaitTime is the max wait time in Permit Stage.
	WaitTime = time.Second * 10

	// ErrReasonNoLabelTopologyZone is used for predicate error.
	ErrReasonNoLabelTopologyZone = "node(s) no topology zone label"

	// ErrReasonNotMatch returned when node topology zone doesn't match.
	ErrReasonNotMatch = "node(s) didn't match the requested topology zone"
)

Variables

This section is empty.

Functions

func New

New initializes a new plugin and returns it.

Types

type NodeZone

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

NodeZone is a plugin that checks node zone.

func (*NodeZone) EventsToRegister

func (pl *NodeZone) EventsToRegister() []framework.ClusterEvent

EventsToRegister returns the possible events that may make a Pod failed by this plugin schedulable.

func (*NodeZone) Filter

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

Filter invoked at the filter extension point.

func (*NodeZone) Name

func (pl *NodeZone) Name() string

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

func (*NodeZone) Permit added in v1.7.3

func (pl *NodeZone) Permit(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) (*framework.Status, time.Duration)

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

func (*NodeZone) PreFilter

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

PreFilter invoked at the prefilter extension point. TODO: upgrade to v1.28.0+

func (*NodeZone) PreFilterExtensions

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

PreFilterExtensions do not exist for this plugin.

func (*NodeZone) Reserve added in v1.7.3

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

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

func (*NodeZone) Unreserve added in v1.7.3

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

Unreserve rejects all other adjacent Pods times out.

Jump to

Keyboard shortcuts

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