populators

package
v1.59.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LabelOwnedByUID label sets the relationship between a resource and "owner"
	LabelOwnedByUID = "cdi.kubevirt.io/OwnedByUID"

	// AnnClonePhase tracks the status of the clone op
	AnnClonePhase = "cdi.kubevirt.io/clonePhase"

	// AnnCloneError has the error string for error phase
	AnnCloneError = "cdi.kubevirt.io/cloneError"

	// AnnCloneFallbackReason has the host-assisted clone fallback reason
	AnnCloneFallbackReason = "cdi.kubevirt.io/cloneFallbackReason"

	// AnnDataSourceNamespace has the namespace of the DataSource
	// this will be deprecated when cross namespace datasource goes beta
	AnnDataSourceNamespace = "cdi.kubevirt.io/dataSourceNamespace"
)
View Source
const (

	// AnnPVCPrimeName annotation is the name of the PVC' that is added to the target PVC
	// used by the upload-proxy in order to get the service name
	AnnPVCPrimeName = cc.AnnAPIGroup + "/storage.populator.pvcPrime"
)

Variables

This section is empty.

Functions

func CreateCommonPopulatorIndexes

func CreateCommonPopulatorIndexes(mgr manager.Manager) error

CreateCommonPopulatorIndexes creates indexes used by all populators

func IsPVCDataSourceRefKind

func IsPVCDataSourceRefKind(pvc *corev1.PersistentVolumeClaim, kind string) bool

IsPVCDataSourceRefKind returns if the PVC has a valid DataSourceRef that is equal to the given kind

func NewClonePopulator

func NewClonePopulator(
	ctx context.Context,
	mgr manager.Manager,
	log logr.Logger,
	clonerImage string,
	pullPolicy string,
	installerLabels map[string]string,
	publicKey *rsa.PublicKey,
) (controller.Controller, error)

NewClonePopulator creates a new instance of the clone-populator controller

func NewImportPopulator

func NewImportPopulator(
	ctx context.Context,
	mgr manager.Manager,
	log logr.Logger,
	installerLabels map[string]string,
) (controller.Controller, error)

NewImportPopulator creates a new instance of the import-populator controller

func NewUploadPopulator

func NewUploadPopulator(
	ctx context.Context,
	mgr manager.Manager,
	log logr.Logger,
	installerLabels map[string]string,
) (controller.Controller, error)

NewUploadPopulator creates a new instance of the upload populator

func PVCPrimeName

func PVCPrimeName(targetPVC *corev1.PersistentVolumeClaim) string

PVCPrimeName returns the name of the PVC' of a given pvc

Types

type ClonePopulatorReconciler

type ClonePopulatorReconciler struct {
	ReconcilerBase
	// contains filtered or unexported fields
}

ClonePopulatorReconciler reconciles PVCs with VolumeCloneSources

func (*ClonePopulatorReconciler) Reconcile

Reconcile the reconcile loop for the PVC with DataSourceRef of VolumeCloneSource kind

type ImportPopulatorReconciler

type ImportPopulatorReconciler struct {
	ReconcilerBase
}

ImportPopulatorReconciler members

func (*ImportPopulatorReconciler) Reconcile

Reconcile the reconcile loop for the PVC with DataSourceRef of VolumeImportSource kind

type Planner

Planner is an interface to mock out planner implementation for testing

type ReconcilerBase

type ReconcilerBase struct {
	// contains filtered or unexported fields
}

ReconcilerBase members

type UploadPopulatorReconciler

type UploadPopulatorReconciler struct {
	ReconcilerBase
}

UploadPopulatorReconciler members

func (*UploadPopulatorReconciler) Reconcile

Reconcile the reconcile loop for the PVC with DataSourceRef of VolumeUploadSource kind

Jump to

Keyboard shortcuts

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