Documentation ¶
Index ¶
- Variables
- func GetPVCfromStorageHandle(ctx context.Context, k8sClient client.Client, storageHandle string) (*corev1.PersistentVolumeClaim, error)
- func GetRestoreStorageClass(ctx context.Context, k8sClient client.Client, storageClassName string, ...) (*storagev1.StorageClass, error)
- func GetStorageClass(ctx context.Context, k8sClient client.Client, storageClassName *string) (*storagev1.StorageClass, error)
- func NewRGDMachine(client client.Client, ...) statemachine.ReplicationMachine
- func NewRGSMachine(client client.Client, ...) statemachine.ReplicationMachine
- type RestoredPVC
- type VSCGHandler
- type VolumeGroupSourceHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VolumeGroupSnapshotNameFormat = "cephfscg-%s" RestorePVCinCGNameFormat = "cephfscg-%s" SnapshotGroup = "snapshot.storage.k8s.io" SnapshotGroupKind = "VolumeSnapshot" )
Functions ¶
func GetPVCfromStorageHandle ¶
func GetRestoreStorageClass ¶
func GetRestoreStorageClass( ctx context.Context, k8sClient client.Client, storageClassName string, defaultCephFSCSIDriverName string, ) (*storagev1.StorageClass, error)
Copied from func (v *VSHandler) ModifyRSSpecForCephFS
func GetStorageClass ¶
func GetStorageClass( ctx context.Context, k8sClient client.Client, storageClassName *string, ) (*storagev1.StorageClass, error)
Copied from func (v *VSHandler) getStorageClass(
func NewRGDMachine ¶
func NewRGDMachine( client client.Client, replicationGroupDestination *ramendrv1alpha1.ReplicationGroupDestination, vsHandler *volsync.VSHandler, logger logr.Logger, ) statemachine.ReplicationMachine
func NewRGSMachine ¶
func NewRGSMachine( client client.Client, replicationGroupSource *ramendrv1alpha1.ReplicationGroupSource, vsHandler *volsync.VSHandler, volumeGroupHandler VolumeGroupSourceHandler, logger logr.Logger, ) statemachine.ReplicationMachine
Types ¶
type RestoredPVC ¶
type VSCGHandler ¶
type VSCGHandler interface { CreateOrUpdateReplicationGroupDestination( replicationGroupDestinationName, replicationGroupDestinationNamespace string, rdSpecsInGroup []ramendrv1alpha1.VolSyncReplicationDestinationSpec, ) (*ramendrv1alpha1.ReplicationGroupDestination, error) CreateOrUpdateReplicationGroupSource( replicationGroupSourceName, replicationGroupSourceNamespace string, runFinalSync bool, ) (*ramendrv1alpha1.ReplicationGroupSource, bool, error) GetLatestImageFromRGD( ctx context.Context, pvcName, pvcNamespace string, ) (*corev1.TypedLocalObjectReference, error) EnsurePVCfromRGD( rdSpec ramendrv1alpha1.VolSyncReplicationDestinationSpec, failoverAction bool, ) error DeleteLocalRDAndRS(rd *volsyncv1alpha1.ReplicationDestination) error GetRDInCG() ([]ramendrv1alpha1.VolSyncReplicationDestinationSpec, error) CheckIfPVCMatchLabel(pvcLabels map[string]string) (bool, error) }
func NewVSCGHandler ¶
func NewVSCGHandler( ctx context.Context, k8sClient client.Client, instance *ramendrv1alpha1.VolumeReplicationGroup, volumeGroupSnapshotSource *metav1.LabelSelector, vsHandler *volsync.VSHandler, cgName string, logger logr.Logger, ) VSCGHandler
type VolumeGroupSourceHandler ¶
type VolumeGroupSourceHandler interface { CreateOrUpdateVolumeGroupSnapshot( ctx context.Context, owner metav1.Object, ) error RestoreVolumesFromVolumeGroupSnapshot( ctx context.Context, owner metav1.Object, ) ([]RestoredPVC, error) CreateOrUpdateReplicationSourceForRestoredPVCs( ctx context.Context, manual string, restoredPVCs []RestoredPVC, owner metav1.Object, ) ([]*corev1.ObjectReference, error) CheckReplicationSourceForRestoredPVCsCompleted( ctx context.Context, replicationSources []*corev1.ObjectReference, ) (bool, error) // Only cleanup restored pvc and volumegoupsnapshot CleanVolumeGroupSnapshot( ctx context.Context, ) error }
func NewVolumeGroupSourceHandler ¶
func NewVolumeGroupSourceHandler( client client.Client, rgs *ramendrv1alpha1.ReplicationGroupSource, defaultCephFSCSIDriverName string, logger logr.Logger, ) VolumeGroupSourceHandler
Click to show internal directories.
Click to hide internal directories.