resizer

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVolumeCapabilities added in v0.5.0

func GetVolumeCapabilities(pvSpec v1.PersistentVolumeSpec, singleNodeMultiWriterCapable bool) (*csilib.VolumeCapability, error)

GetVolumeCapabilities returns a VolumeCapability from the PV spec. Which access mode will be set depends if the driver supports the SINGLE_NODE_MULTI_WRITER capability.

Types

type Resizer

type Resizer interface {
	// Name returns the resizer's name.
	Name() string
	// DriverSupportsControlPlaneExpansion returns true if driver really supports control-plane expansion
	DriverSupportsControlPlaneExpansion() bool
	// CanSupport returns true if resizer supports resize operation of this PV
	// with its corresponding PVC.
	CanSupport(pv *v1.PersistentVolume, pvc *v1.PersistentVolumeClaim) bool
	// Resize executes the resize operation of this PV.
	Resize(pv *v1.PersistentVolume, requestSize resource.Quantity) (newSize resource.Quantity, fsResizeRequired bool, err error)
}

Resizer is responsible for handling pvc resize requests.

func NewResizerFromClient added in v0.2.0

func NewResizerFromClient(
	csiClient csi.Client,
	timeout time.Duration,
	k8sClient kubernetes.Interface,
	driverName string) (Resizer, error)

Jump to

Keyboard shortcuts

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