controller

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: AGPL-3.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolPopPVCToReplicationDestinationIndex string = "volPopPvc.spec.dataSourceRef.Name"
	VolPopPVCToStorageClassIndex           string = "volPopPvc.spec.storageClassName"

	VolPopCRName string = "volsync-replicationdestination"
)
View Source
const (
	ReplicationSourceToSourcePVCIndex string = "replicationsource.spec.sourcePVC"
)

Variables

This section is empty.

Functions

func EnsureVolSyncVolumePopulatorCRIfCRDPresent

func EnsureVolSyncVolumePopulatorCRIfCRDPresent(ctx context.Context,
	k8sClient client.Client, logger logr.Logger) error

If the VolumePopulator CRD is present (i.e. the VolumePopulator API is available), then make sure we have VolumePopulator CR to register VolSync ReplicationDestination as a valid VolumePopulator

func GetVolumePopulatorPVCPrime

func GetVolumePopulatorPVCPrime(ctx context.Context, c client.Client,
	pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error)

Finds PVCPrime - will return nil if PVCPrime is not found

func IndexFieldsForReplicationSource

func IndexFieldsForReplicationSource(ctx context.Context, fieldIndexer client.FieldIndexer) error

func IndexFieldsForVolumePopulator

func IndexFieldsForVolumePopulator(ctx context.Context, fieldIndexer client.FieldIndexer) error

Types

type ReplicationDestinationReconciler

type ReplicationDestinationReconciler struct {
	client.Client
	Log           logr.Logger
	Scheme        *runtime.Scheme
	EventRecorder record.EventRecorder
}

ReplicationDestinationReconciler reconciles a ReplicationDestination object

func (*ReplicationDestinationReconciler) Reconcile

func (*ReplicationDestinationReconciler) SetupWithManager

func (r *ReplicationDestinationReconciler) SetupWithManager(mgr ctrl.Manager) error

type ReplicationSourceReconciler

type ReplicationSourceReconciler struct {
	client.Client
	Log           logr.Logger
	Scheme        *runtime.Scheme
	EventRecorder record.EventRecorder
}

ReplicationSourceReconciler reconciles a ReplicationSource object

func (*ReplicationSourceReconciler) Reconcile

func (*ReplicationSourceReconciler) SetupWithManager

func (r *ReplicationSourceReconciler) SetupWithManager(mgr ctrl.Manager) error

type VolumePopulatorReconciler

type VolumePopulatorReconciler struct {
	client.Client
	Log           logr.Logger
	Scheme        *runtime.Scheme
	EventRecorder record.EventRecorder
}

VolumePopulatorReconciler reconciles PVCs that use a dataSourceRef that refers to a ReplicationDestination object. The VolumePopulatorReconciler will create a PVC from the latest snapshot image in a ReplicationDestination.

func (*VolumePopulatorReconciler) Reconcile

Reconcile logic is adapted from reference at: https://github.com/kubernetes-csi/lib-volume-populator/blob/master/populator-machinery/controller.go

func (*VolumePopulatorReconciler) SetupWithManager

func (r *VolumePopulatorReconciler) SetupWithManager(mgr ctrl.Manager) error

Directories

Path Synopsis
VolSync data movers are created by implementing the interfaces in this package.
VolSync data movers are created by implementing the interfaces in this package.

Jump to

Keyboard shortcuts

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