Documentation ¶
Index ¶
- Constants
- Variables
- func BuildResticSecret(givensecret *corev1.Secret, secret *corev1.Secret, ...) error
- func GetBackupBatchValue(namespace string, client client.Client) (string, error)
- func GetDataMoverConfigMap(namespace string, sc string, log logr.Logger, client client.Client) (*corev1.ConfigMap, error)
- func GetPodSecurityContext(namespace string, sourcePVCName string, c client.Client) (*corev1.PodSecurityContext, error)
- func GetRestoreBatchValue(namespace string, client client.Client) (string, error)
- func GetVeleroServiceAccount(namespace string, client client.Client) (*corev1.ServiceAccount, error)
- func PopulateResticSecret(name string, namespace string, label string) (*corev1.Secret, error)
- func ReconcileBatch(l logr.Logger, reconcileFuncs ...ReconcileFunc) (bool, error)
- func ValidateResticSecret(resticsecret *corev1.Secret) error
- type ReconcileFunc
- type RetainPolicy
- type VolumeSnapshotBackupReconciler
- func (r *VolumeSnapshotBackupReconciler) BindPVCToDummyPod(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) CleanBackupResources(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) CreateReplicationSource(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) CreateVSBResticSecret(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) IsPVCBound(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) MirrorPVC(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) MirrorVolumeSnapshot(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) MirrorVolumeSnapshotContent(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *VolumeSnapshotBackupReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *VolumeSnapshotBackupReconciler) ValidateVolumeSnapshotMoverBackup(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) WaitForClonedVolumeSnapshotContentToBeReady(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotBackupReconciler) WaitForClonedVolumeSnapshotToBeReady(log logr.Logger) (bool, error)
- type VolumeSnapshotRestoreReconciler
- func (r *VolumeSnapshotRestoreReconciler) CleanRestoreResources(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotRestoreReconciler) CreateReplicationDestination(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotRestoreReconciler) CreateVSRResticSecret(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotRestoreReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *VolumeSnapshotRestoreReconciler) SetVSRStatus(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotRestoreReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *VolumeSnapshotRestoreReconciler) ValidateVolumeSnapshotMoverRestore(log logr.Logger) (bool, error)
- func (r *VolumeSnapshotRestoreReconciler) WaitForVolSyncSnapshotContentToBeReady(log logr.Logger) (bool, error)
Constants ¶
const ( VSBLabel = "datamover.oadp.openshift.io/vsb" VSRLabel = "datamover.oadp.openshift.io/vsr" DummyPodImage = "quay.io/konveyor/rsync-transfer:latest" OADPBSLProviderName = "openshift.io/oadp-bsl-provider" )
const ( // AWS vars AWSAccessKey = "AWS_ACCESS_KEY_ID" AWSSecretKey = "AWS_SECRET_ACCESS_KEY" AWSDefaultRegion = "AWS_DEFAULT_REGION" // Azure vars AzureAccountName = "AZURE_ACCOUNT_NAME" AzureAccountKey = "AZURE_ACCOUNT_KEY" // GCP vars GoogleApplicationCredentials = "GOOGLE_APPLICATION_CREDENTIALS" // Restic repo vars ResticCustomCA = "RESTIC_CUSTOM_CA" ResticPassword = "RESTIC_PASSWORD" ResticRepository = "RESTIC_REPOSITORY" ResticPruneInterval = "restic-prune-interval" // Datamover annotation keys DatamoverResticRepository = "datamover.io/restic-repository" DatamoverSourcePVCName = "datamover.io/source-pvc-name" DatamoverSourcePVCSize = "datamover.io/source-pvc-size" // Providers AWSProvider = "aws" AzureProvider = "azure" GCPProvider = "gcp" )
Restic secret data keys
const ( // replicationSource values SourceStorageClassName = "SourceStorageClassName" SourceAccessMoce = "SourceAccessMode" SourceCacheStorageClassName = "SourceCacheStorageClassName" SourceCacheAccessMoce = "SourceCacheAccessMode" SourceCacheCapacity = "SourceCacheCapacity" SourceCacheAccessMode = "SourceCacheAccessMode" SourceMoverSecurityContext = "SourceMoverSecurityContext" // replicationDestination values DestinationStorageClassName = "DestinationStorageClassName" DestinationAccessMoce = "DestinationAccessMode" DestinationCacheStorageClassName = "DestinationCacheStorageClassName" DestinationCacheAccessMoce = "DestinationCacheAccessMode" DestinationCacheCapacity = "DestinationCacheCapacity" DestinationCacheAccessMode = "DestinationCacheAccessMode" DestinationMoverSecurityContext = "DestinationMoverSecurityContext" // RetainPolicy parameters SnapshotRetainPolicyHourly = "SnapshotRetainPolicyHourly" SnapshotRetainPolicyDaily = "SnapshotRetainPolicyDaily" SnapshotRetainPolicyWeekly = "SnapshotRetainPolicyWeekly" SnapshotRetainPolicyMonthly = "SnapshotRetainPolicyMonthly" SnapshotRetainPolicyYearly = "SnapshotRetainPolicyYearly" SnapshotRetainPolicyWithin = "SnapshotRetainPolicyWithin" // Snapshot retain schedule trigger value SnapshotScheduleCron = "SnapshotScheduleCron" )
VSM configmap values
const ( // VolumeSnapshotMover annotation keys SnapMoverResticRepository = "datamover.io/restic-repository" SnapMoverSourcePVCName = "datamover.io/source-pvc-name" SnapMoverSourcePVCSize = "datamover.io/source-pvc-size" )
Restic secret data keys
const ConditionReconciled = "Reconciled"
const ReconcileCompleteMessage = "Reconcile complete"
const ReconciledReasonComplete = "Complete"
const ReconciledReasonError = "Error"
Variables ¶
var ( AWSAccessValue []byte AWSSecretValue []byte AWSDefaultRegionValue []byte AzureAccountNameValue []byte AzureAccountKeyValue []byte GoogleApplicationCredentialsValue []byte ResticCustomCAValue []byte ResticPasswordValue []byte ResticRepoValue string ResticPruneIntervalValue []byte )
Restic secret vars to create new secrets
var VSBBatchNumber = 0
var VSRBatchNumber = 0
Functions ¶
func BuildResticSecret ¶
func GetBackupBatchValue ¶
func GetDataMoverConfigMap ¶
func GetPodSecurityContext ¶
func GetRestoreBatchValue ¶
func GetVeleroServiceAccount ¶
func PopulateResticSecret ¶
func ReconcileBatch ¶
func ReconcileBatch(l logr.Logger, reconcileFuncs ...ReconcileFunc) (bool, error)
reconcileBatch steps through a list of reconcile functions until one returns false or an error.
func ValidateResticSecret ¶
Types ¶
type RetainPolicy ¶
type RetainPolicy struct {
// contains filtered or unexported fields
}
type VolumeSnapshotBackupReconciler ¶
type VolumeSnapshotBackupReconciler struct { client.Client Scheme *runtime.Scheme Log logr.Logger Context context.Context NamespacedName types.NamespacedName EventRecorder record.EventRecorder // contains filtered or unexported fields }
VolumeSnapshotBackupReconciler reconciles a VolumeSnapshotBackup object
func (*VolumeSnapshotBackupReconciler) BindPVCToDummyPod ¶
func (r *VolumeSnapshotBackupReconciler) BindPVCToDummyPod(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) CleanBackupResources ¶
func (r *VolumeSnapshotBackupReconciler) CleanBackupResources(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) CreateReplicationSource ¶
func (r *VolumeSnapshotBackupReconciler) CreateReplicationSource(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) CreateVSBResticSecret ¶
func (r *VolumeSnapshotBackupReconciler) CreateVSBResticSecret(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) IsPVCBound ¶
func (r *VolumeSnapshotBackupReconciler) IsPVCBound(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) MirrorPVC ¶
func (r *VolumeSnapshotBackupReconciler) MirrorPVC(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) MirrorVolumeSnapshot ¶
func (r *VolumeSnapshotBackupReconciler) MirrorVolumeSnapshot(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) MirrorVolumeSnapshotContent ¶
func (r *VolumeSnapshotBackupReconciler) MirrorVolumeSnapshotContent(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) Reconcile ¶
func (r *VolumeSnapshotBackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the VolumeSnapshotBackup object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile
func (*VolumeSnapshotBackupReconciler) SetupWithManager ¶
func (r *VolumeSnapshotBackupReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*VolumeSnapshotBackupReconciler) ValidateVolumeSnapshotMoverBackup ¶
func (r *VolumeSnapshotBackupReconciler) ValidateVolumeSnapshotMoverBackup(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) WaitForClonedVolumeSnapshotContentToBeReady ¶
func (r *VolumeSnapshotBackupReconciler) WaitForClonedVolumeSnapshotContentToBeReady(log logr.Logger) (bool, error)
func (*VolumeSnapshotBackupReconciler) WaitForClonedVolumeSnapshotToBeReady ¶
func (r *VolumeSnapshotBackupReconciler) WaitForClonedVolumeSnapshotToBeReady(log logr.Logger) (bool, error)
type VolumeSnapshotRestoreReconciler ¶
type VolumeSnapshotRestoreReconciler struct { client.Client Scheme *runtime.Scheme Log logr.Logger Context context.Context NamespacedName types.NamespacedName EventRecorder record.EventRecorder // contains filtered or unexported fields }
VolumeSnapshotRestoreReconciler reconciles a VolumeSnapshotRestore object
func (*VolumeSnapshotRestoreReconciler) CleanRestoreResources ¶
func (r *VolumeSnapshotRestoreReconciler) CleanRestoreResources(log logr.Logger) (bool, error)
func (*VolumeSnapshotRestoreReconciler) CreateReplicationDestination ¶
func (r *VolumeSnapshotRestoreReconciler) CreateReplicationDestination(log logr.Logger) (bool, error)
func (*VolumeSnapshotRestoreReconciler) CreateVSRResticSecret ¶
func (r *VolumeSnapshotRestoreReconciler) CreateVSRResticSecret(log logr.Logger) (bool, error)
func (*VolumeSnapshotRestoreReconciler) SetVSRStatus ¶
func (r *VolumeSnapshotRestoreReconciler) SetVSRStatus(log logr.Logger) (bool, error)
func (*VolumeSnapshotRestoreReconciler) SetupWithManager ¶
func (r *VolumeSnapshotRestoreReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*VolumeSnapshotRestoreReconciler) ValidateVolumeSnapshotMoverRestore ¶
func (r *VolumeSnapshotRestoreReconciler) ValidateVolumeSnapshotMoverRestore(log logr.Logger) (bool, error)
func (*VolumeSnapshotRestoreReconciler) WaitForVolSyncSnapshotContentToBeReady ¶
func (r *VolumeSnapshotRestoreReconciler) WaitForVolSyncSnapshotContentToBeReady(log logr.Logger) (bool, error)