volumezone

package
v1.27.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Index

Constants

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

	// ErrReasonConflict is used for NoVolumeZoneConflict predicate error.
	ErrReasonConflict = "node(s) had no available volume zone"
)

Variables

This section is empty.

Functions

func New

New initializes a new plugin and returns it.

Types

type VolumeZone

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

VolumeZone is a plugin that checks volume zone.

func (*VolumeZone) EventsToRegister added in v1.22.0

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

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

func (*VolumeZone) Filter

func (pl *VolumeZone) Filter(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status

Filter invoked at the filter extension point.

It evaluates if a pod can fit due to the volumes it requests, given that some volumes may have zone scheduling constraints. The requirement is that any volume zone-labels must match the equivalent zone-labels on the node. It is OK for the node to have more zone-label constraints (for example, a hypothetical replicated volume might allow region-wide access)

Currently this is only supported with PersistentVolumeClaims, and looks to the labels only on the bound PersistentVolume.

Working with volumes declared inline in the pod specification (i.e. not using a PersistentVolume) is likely to be harder, as it would require determining the zone of a volume during scheduling, and that is likely to require calling out to the cloud provider. It seems that we are moving away from inline volume declarations anyway.

func (*VolumeZone) Name

func (pl *VolumeZone) Name() string

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

func (*VolumeZone) PreFilter added in v1.27.0

PreFilter invoked at the prefilter extension point

It finds the topology of the PersistentVolumes corresponding to the volumes a pod requests

Currently, this is only supported with PersistentVolumeClaims, and only looks for the bound PersistentVolume.

func (*VolumeZone) PreFilterExtensions added in v1.27.0

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

PreFilterExtensions returns prefilter extensions, pod add and remove.

Jump to

Keyboard shortcuts

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