Documentation
¶
Index ¶
- Constants
- func GeneratePatchPayload(patches ...PatchOperation) ([]byte, error)
- func GenerateTestReplacePatch(path string, oldValue, newValue interface{}) ([]byte, error)
- func HasSharedAccessMode(accessModes []k8sv1.PersistentVolumeAccessMode) bool
- func IsPVCBlock(volumeMode *k8sv1.PersistentVolumeMode) bool
- func IsPVCBlockFromStore(store cache.Store, namespace string, claimName string) (pvc *k8sv1.PersistentVolumeClaim, exists bool, isBlockDevice bool, err error)
- func IsPreallocated(annotations map[string]string) bool
- func PVCNameFromVirtVolume(volume *virtv1.Volume) string
- func VirtVolumesToPVCMap(volumes []*virtv1.Volume, pvcStore cache.Store, namespace string) (map[string]*k8sv1.PersistentVolumeClaim, error)
- type CloneSource
- type PatchOperation
Constants ¶
View Source
const ( PatchReplaceOp = "replace" PatchTestOp = "test" PatchAddOp = "add" )
Variables ¶
This section is empty.
Functions ¶
func GeneratePatchPayload ¶ added in v0.55.0
func GeneratePatchPayload(patches ...PatchOperation) ([]byte, error)
func GenerateTestReplacePatch ¶ added in v0.55.0
func HasSharedAccessMode ¶ added in v0.45.0
func HasSharedAccessMode(accessModes []k8sv1.PersistentVolumeAccessMode) bool
func IsPVCBlock ¶ added in v0.50.0
func IsPVCBlock(volumeMode *k8sv1.PersistentVolumeMode) bool
func IsPVCBlockFromStore ¶
func IsPreallocated ¶ added in v0.40.0
func PVCNameFromVirtVolume ¶ added in v0.44.1
Types ¶
type CloneSource ¶ added in v0.44.1
func GetCloneSource ¶ added in v0.44.1
func GetCloneSource(ctx context.Context, client kubecli.KubevirtClient, vm *virtv1.VirtualMachine, dvSpec *cdiv1.DataVolumeSpec) (*CloneSource, error)
func GetCloneSourceWithInformers ¶ added in v0.46.0
func GetCloneSourceWithInformers(vm *virtv1.VirtualMachine, dvSpec *cdiv1.DataVolumeSpec, dataSourceInformer cache.SharedIndexInformer) (*CloneSource, error)
type PatchOperation ¶ added in v0.42.0
type PatchOperation struct { Op string `json:"op"` Path string `json:"path"` Value interface{} `json:"value"` }
func UnmarshalPatch ¶ added in v0.55.0
func UnmarshalPatch(patch []byte) ([]PatchOperation, error)
Click to show internal directories.
Click to hide internal directories.