libdv

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataVolume

func NewDataVolume(options ...dvOption) *v1beta1.DataVolume

NewDataVolume Set up a new DataVolume with a random name, a namespace and an optional list of options

func PVCWithAccessMode added in v0.59.0

func PVCWithAccessMode(accessMode corev1.PersistentVolumeAccessMode) pvcOption

PVCWithAccessMode overrides the DV default access mode (ReadWriteOnce) with the accessMode parameter

func PVCWithBlockVolumeMode added in v0.59.0

func PVCWithBlockVolumeMode() pvcOption

PVCWithBlockVolumeMode adds the PersistentVolumeBlock volume mode to the DV

func PVCWithReadWriteManyAccessMode added in v0.59.0

func PVCWithReadWriteManyAccessMode() pvcOption

PVCWithReadWriteManyAccessMode set the DV access mode to ReadWriteMany

func PVCWithStorageClass added in v0.59.0

func PVCWithStorageClass(sc string) pvcOption

PVCWithStorageClass add the sc storage class name to the DV

func PVCWithVolumeMode added in v0.59.0

func PVCWithVolumeMode(volumeMode corev1.PersistentVolumeMode) pvcOption

PVCWithVolumeMode adds the volume mode to the DV

func PVCWithVolumeSize added in v0.59.0

func PVCWithVolumeSize(size string) pvcOption

PVCWithVolumeSize overrides the default volume size (cd.CirrosVolumeSize), with the size parameter The size parameter must be in parsable valid quantity string.

func WithBlankImageSource

func WithBlankImageSource() dvOption

WithBlankImageSource is a dvOption to add a blank DataVolumeSource to the DataVolume

func WithForceBindAnnotation

func WithForceBindAnnotation() dvOption

WithForceBindAnnotation adds the "cdi.kubevirt.io/storage.bind.immediate.requested" annotation to the DV, with the value of "true"

func WithName added in v1.2.0

func WithName(name string) dvOption

func WithNamespace

func WithNamespace(namespace string) dvOption

func WithPVC

func WithPVC(options ...pvcOption) dvOption

WithPVC is a dvOption to add a PVCOption spec to the DataVolume The function receives an optional list of pvcOption, to override the defaults

The default values are: * no storage class * access mode of ReadWriteOnce * volume size of cd.CirrosVolumeSize * no volume mode. kubernetes default is PersistentVolumeFilesystem

func WithPVCSource

func WithPVCSource(namespace, name string) dvOption

WithPVCSource is a dvOption to add a DataVolumeSource to the DataVolume, with a PVC source

func WithRegistryURLSource

func WithRegistryURLSource(imageURL string) dvOption

WithRegistryURLSource is a dvOption to add a DataVolumeSource to the DataVolume, with a registry and a URL

func WithRegistryURLSourceAndPullMethod

func WithRegistryURLSourceAndPullMethod(imageURL string, pullMethod v1beta1.RegistryPullMethod) dvOption

WithRegistryURLSourceAndPullMethod is a dvOption to add a DataVolumeSource to the DataVolume, with a registry and URL + pull method

Types

This section is empty.

Jump to

Keyboard shortcuts

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