Documentation ¶
Index ¶
- func NewDataVolume(options ...dvOption) *v1beta1.DataVolume
- func PVCWithStorageClass(sc string) pvcOption
- func StorageWithAccessMode(accessMode corev1.PersistentVolumeAccessMode) storageOption
- func StorageWithBlockVolumeMode() storageOption
- func StorageWithReadWriteManyAccessMode() storageOption
- func StorageWithStorageClass(sc string) storageOption
- func StorageWithVolumeMode(volumeMode corev1.PersistentVolumeMode) storageOption
- func StorageWithVolumeSize(size string) storageOption
- func WithBlankImageSource() dvOption
- func WithDataVolumeSourceRef(kind, namespace, name string) dvOption
- func WithDefaultInstancetype(kind, name string) dvOption
- func WithDefaultPreference(kind, name string) dvOption
- func WithForceBindAnnotation() dvOption
- func WithName(name string) dvOption
- func WithNamespace(namespace string) dvOption
- func WithPVC(options ...pvcOption) dvOption
- func WithPVCSource(namespace, name string) dvOption
- func WithRegistryURLSource(imageURL string) dvOption
- func WithRegistryURLSourceAndPullMethod(imageURL string, pullMethod v1beta1.RegistryPullMethod) dvOption
- func WithStorage(options ...storageOption) dvOption
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 ¶ added in v1.4.0
func StorageWithAccessMode(accessMode corev1.PersistentVolumeAccessMode) storageOption
StorageWithAccessMode overrides the DV default access mode (ReadWriteOnce) with the accessMode parameter
func StorageWithBlockVolumeMode ¶ added in v1.4.0
func StorageWithBlockVolumeMode() storageOption
StorageWithBlockVolumeMode adds the PersistentVolumeBlock volume mode to the DV
func StorageWithReadWriteManyAccessMode ¶ added in v1.4.0
func StorageWithReadWriteManyAccessMode() storageOption
StorageWithReadWriteManyAccessMode set the DV access mode to ReadWriteMany
func StorageWithStorageClass ¶ added in v1.4.0
func StorageWithStorageClass(sc string) storageOption
Storage Options StorageWithStorageClass add the sc storage class name to the DV
func StorageWithVolumeMode ¶ added in v1.4.0
func StorageWithVolumeMode(volumeMode corev1.PersistentVolumeMode) storageOption
StorageWithVolumeMode adds the volume mode to the DV
func StorageWithVolumeSize ¶ added in v1.4.0
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 ¶ added in v1.4.0
func WithDataVolumeSourceRef(kind, namespace, name string) dvOption
func WithDefaultInstancetype ¶ added in v1.4.0
func WithDefaultInstancetype(kind, name string) dvOption
func WithDefaultPreference ¶ added in v1.4.0
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 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 ¶ added in v1.4.0
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.