nodevolumelimits

package
v1.31.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 29 Imported by: 7

Documentation

Index

Constants

View Source
const (

	// ErrReasonMaxVolumeCountExceeded is used for MaxVolumeCount predicate error.
	ErrReasonMaxVolumeCountExceeded = "node(s) exceed max volume count"

	// KubeMaxPDVols defines the maximum number of PD Volumes per kubelet.
	KubeMaxPDVols = "KUBE_MAX_PD_VOLS"
)
View Source
const AzureDiskName = names.AzureDiskLimits

AzureDiskName is the name of the plugin used in the plugin registry and configurations.

CSIName is the name of the plugin used in the plugin registry and configurations.

View Source
const CinderName = names.CinderLimits

CinderName is the name of the plugin used in the plugin registry and configurations.

View Source
const EBSName = names.EBSLimits

EBSName is the name of the plugin used in the plugin registry and configurations.

View Source
const GCEPDName = names.GCEPDLimits

GCEPDName is the name of the plugin used in the plugin registry and configurations.

Variables

This section is empty.

Functions

func NewAzureDisk

func NewAzureDisk(ctx context.Context, _ runtime.Object, handle framework.Handle, fts feature.Features) (framework.Plugin, error)

NewAzureDisk returns function that initializes a new plugin and returns it.

func NewCSI

NewCSI initializes a new plugin and returns it.

func NewCinder

NewCinder returns function that initializes a new plugin and returns it.

func NewEBS

NewEBS returns function that initializes a new plugin and returns it.

func NewGCEPD

NewGCEPD returns function that initializes a new plugin and returns it.

Types

type CSILimits

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

CSILimits is a plugin that checks node volume limits.

func (*CSILimits) EventsToRegister added in v1.22.0

func (pl *CSILimits) EventsToRegister(_ context.Context) ([]framework.ClusterEventWithHint, error)

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

func (*CSILimits) Filter

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

Filter invoked at the filter extension point.

func (*CSILimits) Name

func (pl *CSILimits) Name() string

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

func (*CSILimits) PreFilter added in v1.28.0

PreFilter invoked at the prefilter extension point

If the pod haven't those types of volumes, we'll skip the Filter phase

func (*CSILimits) PreFilterExtensions added in v1.28.0

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

PreFilterExtensions returns prefilter extensions, pod add and remove.

type InTreeToCSITranslator added in v1.18.0

type InTreeToCSITranslator interface {
	IsPVMigratable(pv *v1.PersistentVolume) bool
	IsInlineMigratable(vol *v1.Volume) bool
	IsMigratableIntreePluginByName(inTreePluginName string) bool
	GetInTreePluginNameFromSpec(pv *v1.PersistentVolume, vol *v1.Volume) (string, error)
	GetCSINameFromInTreeName(pluginName string) (string, error)
	TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
	TranslateInTreeInlineVolumeToCSI(volume *v1.Volume, podNamespace string) (*v1.PersistentVolume, error)
}

InTreeToCSITranslator contains methods required to check migratable status and perform translations from InTree PV's to CSI

type VolumeFilter added in v1.18.0

type VolumeFilter struct {
	// Filter normal volumes
	FilterVolume           func(vol *v1.Volume) (id string, relevant bool)
	FilterPersistentVolume func(pv *v1.PersistentVolume) (id string, relevant bool)
	// MatchProvisioner evaluates if the StorageClass provisioner matches the running predicate
	MatchProvisioner func(sc *storage.StorageClass) (relevant bool)
	// IsMigrated returns a boolean specifying whether the plugin is migrated to a CSI driver
	IsMigrated func(csiNode *storage.CSINode) bool
}

VolumeFilter contains information on how to filter PD Volumes when checking PD Volume caps.

Jump to

Keyboard shortcuts

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