resizer

package
v1.5.0 Latest Latest
Warning

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

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

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,
	informerFactory informers.SharedInformerFactory,
	driverName string) (Resizer, error)

Jump to

Keyboard shortcuts

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