cache

package
v1.12.10-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PVCWithResizeRequest

type PVCWithResizeRequest struct {
	// PVC that needs to be resized
	PVC *v1.PersistentVolumeClaim
	// persistentvolume
	PersistentVolume *v1.PersistentVolume
	// Current volume size
	CurrentSize resource.Quantity
	// Expended volume size
	ExpectedSize resource.Quantity
}

PVCWithResizeRequest struct defines data structure that stores state needed for performing file system resize

func (*PVCWithResizeRequest) QualifiedName

func (pvcr *PVCWithResizeRequest) QualifiedName() string

QualifiedName returns namespace and name combination of the PVC

func (*PVCWithResizeRequest) UniquePVCKey

func (pvcr *PVCWithResizeRequest) UniquePVCKey() types.UniquePVCName

UniquePVCKey returns unique key of the PVC based on its UID

type VolumeResizeMap

type VolumeResizeMap interface {
	// AddPVCUpdate adds pvc for resizing
	AddPVCUpdate(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume)
	// DeletePVC deletes pvc that is scheduled for resizing
	DeletePVC(pvc *v1.PersistentVolumeClaim)
	// GetPVCsWithResizeRequest returns all pending pvc resize requests
	GetPVCsWithResizeRequest() []*PVCWithResizeRequest
	// MarkAsResized marks a pvc as fully resized
	MarkAsResized(*PVCWithResizeRequest, resource.Quantity) error
	// UpdatePVSize updates just pv size after cloudprovider resizing is successful
	UpdatePVSize(*PVCWithResizeRequest, resource.Quantity) error
	// MarkForFSResize updates pvc condition to indicate that a file system resize is pending
	MarkForFSResize(*PVCWithResizeRequest) error
}

VolumeResizeMap defines an interface that serves as a cache for holding pending resizing requests

func NewVolumeResizeMap

func NewVolumeResizeMap(kubeClient clientset.Interface) VolumeResizeMap

NewVolumeResizeMap returns new VolumeResizeMap which acts as a cache for holding pending resize requests.

Jump to

Keyboard shortcuts

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