Documentation ¶
Index ¶
- func NewDataVolume(options ...dvOption) *v1beta1.DataVolume
- func PVCWithAccessMode(accessMode corev1.PersistentVolumeAccessMode) pvcOption
- func PVCWithBlockVolumeMode() pvcOption
- func PVCWithReadWriteManyAccessMode() pvcOption
- func PVCWithStorageClass(sc string) pvcOption
- func PVCWithVolumeMode(volumeMode corev1.PersistentVolumeMode) pvcOption
- func PVCWithVolumeSize(size string) pvcOption
- func WithBlankImageSource() dvOption
- func WithForceBindAnnotation() 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
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 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.