types

package
v0.57.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MiB = 1024 * 1024

Variables

This section is empty.

Functions

func GetFilesystemOverhead

func GetFilesystemOverhead(volumeMode *k8sv1.PersistentVolumeMode, storageClass *string, cdiConfig *cdiv1.CDIConfig) cdiv1.Percent

func GetSizeIncludingFSOverhead

func GetSizeIncludingFSOverhead(size *resource.Quantity, storageClass *string, volumeMode *k8sv1.PersistentVolumeMode, cdiConfig *cdiv1.CDIConfig) (*resource.Quantity, error)

func GetSizeIncludingGivenOverhead

func GetSizeIncludingGivenOverhead(size *resource.Quantity, overhead cdiv1.Percent) (*resource.Quantity, error)

func HasSharedAccessMode

func HasSharedAccessMode(accessModes []k8sv1.PersistentVolumeAccessMode) bool

func IsPVCBlock

func IsPVCBlock(volumeMode *k8sv1.PersistentVolumeMode) bool

func IsPVCBlockFromStore

func IsPVCBlockFromStore(store cache.Store, namespace string, claimName string) (pvc *k8sv1.PersistentVolumeClaim, exists bool, isBlockDevice bool, err error)

func IsPreallocated

func IsPreallocated(annotations map[string]string) bool

func IsReadOnlyAccessMode

func IsReadOnlyAccessMode(accessModes []k8sv1.PersistentVolumeAccessMode) bool

func PVCNameFromVirtVolume

func PVCNameFromVirtVolume(volume *virtv1.Volume) string

func VirtVolumesToPVCMap

func VirtVolumesToPVCMap(volumes []*virtv1.Volume, pvcStore cache.Store, namespace string) (map[string]*k8sv1.PersistentVolumeClaim, error)

Types

type CloneSource

type CloneSource struct {
	Namespace string
	Name      string
}

func GetCloneSourceWithInformers

func GetCloneSourceWithInformers(vm *virtv1.VirtualMachine, dvSpec *cdiv1.DataVolumeSpec, dataSourceInformer cache.SharedIndexInformer) (*CloneSource, error)

Jump to

Keyboard shortcuts

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