libdv

package
v1.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 8 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 PVCWithStorageClass added in v0.59.0

func PVCWithStorageClass(sc string) pvcOption

PVC Options PVCWithStorageClass add the sc storage class name to the DV

func StorageWithAccessMode

func StorageWithAccessMode(accessMode corev1.PersistentVolumeAccessMode) storageOption

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

func StorageWithBlockVolumeMode

func StorageWithBlockVolumeMode() storageOption

StorageWithBlockVolumeMode adds the PersistentVolumeBlock volume mode to the DV

func StorageWithReadWriteManyAccessMode

func StorageWithReadWriteManyAccessMode() storageOption

StorageWithReadWriteManyAccessMode set the DV access mode to ReadWriteMany

func StorageWithStorageClass

func StorageWithStorageClass(sc string) storageOption

Storage Options StorageWithStorageClass add the sc storage class name to the DV

func StorageWithVolumeMode

func StorageWithVolumeMode(volumeMode corev1.PersistentVolumeMode) storageOption

StorageWithVolumeMode adds the volume mode to the DV

func StorageWithVolumeSize

func StorageWithVolumeSize(size string) storageOption

StorageWithVolumeSize 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 WithDataVolumeSourceRef

func WithDataVolumeSourceRef(kind, namespace, name string) dvOption

func WithDefaultInstancetype

func WithDefaultInstancetype(kind, name string) dvOption

func WithDefaultPreference

func WithDefaultPreference(kind, name string) dvOption

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 * access mode of ReadWriteOnce * 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

func WithStorage

func WithStorage(options ...storageOption) dvOption

WithStorage is a dvOption to add a StorageOption spec to the DataVolume The function receives an optional list of StorageOption, to override the defaults

The default values are: * no storage class * access mode from the StorgeProfile * volume size of cd.CirrosVolumeSize * volume mode from the storageProfile

Types

This section is empty.

Jump to

Keyboard shortcuts

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