Documentation
¶
Index ¶
- Constants
- func EscapeJSONPointer(ptr string) string
- func GeneratePatchPayload(patches ...PatchOperation) ([]byte, error)
- func GenerateTestReplacePatch(path string, oldValue, newValue interface{}) ([]byte, error)
- func GetFilesystemOverhead(volumeMode *k8sv1.PersistentVolumeMode, storageClass *string, ...) cdiv1.Percent
- func GetSizeIncludingFSOverhead(size *resource.Quantity, storageClass *string, ...) (*resource.Quantity, error)
- func GetSizeIncludingGivenOverhead(size *resource.Quantity, overhead cdiv1.Percent) (*resource.Quantity, 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 IsReadOnlyAccessMode(accessModes []k8sv1.PersistentVolumeAccessMode) 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" )
View Source
const MiB = 1024 * 1024
Variables ¶
This section is empty.
Functions ¶
func EscapeJSONPointer ¶ added in v0.56.0
func GeneratePatchPayload ¶ added in v0.55.0
func GeneratePatchPayload(patches ...PatchOperation) ([]byte, error)
func GenerateTestReplacePatch ¶ added in v0.55.0
func GetFilesystemOverhead ¶ added in v0.56.0
func GetSizeIncludingFSOverhead ¶ added in v0.56.0
func GetSizeIncludingGivenOverhead ¶ added in v0.56.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 IsReadOnlyAccessMode ¶ added in v0.56.0
func IsReadOnlyAccessMode(accessModes []k8sv1.PersistentVolumeAccessMode) bool
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.