types

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 GenerateTestReplacePatch(path string, oldValue, newValue interface{}) ([]byte, error)

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 IsPVCBlockFromStore(store cache.Store, namespace string, claimName string) (pvc *k8sv1.PersistentVolumeClaim, exists bool, isBlockDevice bool, err error)

func IsPreallocated added in v0.40.0

func IsPreallocated(annotations map[string]string) bool

func PVCNameFromVirtVolume added in v0.44.1

func PVCNameFromVirtVolume(volume *virtv1.Volume) string

func VirtVolumesToPVCMap added in v0.44.1

func VirtVolumesToPVCMap(volumes []*virtv1.Volume, pvcStore cache.Store, namespace string) (map[string]*k8sv1.PersistentVolumeClaim, error)

Types

type CloneSource added in v0.44.1

type CloneSource struct {
	Namespace string
	Name      string
}

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)

Jump to

Keyboard shortcuts

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