Documentation ¶
Index ¶
Constants ¶
const ( StageOrFinalMigrationAnnotation = "migration.openshift.io/migmigration-type" // (stage|final) StageMigration = "stage" FinalMigration = "final" PvActionAnnotation = "openshift.io/migrate-type" // (move|copy) PvStorageClassAnnotation = "openshift.io/target-storage-class" // storageClassName PvAccessModeAnnotation = "openshift.io/target-access-mode" // accessMode PvCopyMethodAnnotation = "migration.openshift.io/copy-method" // (snapshot|filesystem) QuiesceAnnotation = "openshift.io/migrate-quiesce-pods" // (true|false) QuiesceNodeSelector = "migration.openshift.io/quiesceDaemonSet" SuspendAnnotation = "migration.openshift.io/preQuiesceSuspend" ReplicasAnnotation = "migration.openshift.io/preQuiesceReplicas" NodeSelectorAnnotation = "migration.openshift.io/preQuiesceNodeSelector" StagePodImageAnnotation = "migration.openshift.io/stage-pod-image" )
Velero Plugin Annotations
const ( ResticPvBackupAnnotation = "backup.velero.io/backup-volumes" // comma-separated list of volume names ResticPvVerifyAnnotation = "backup.velero.io/verify-volumes" // comma-separated list of volume names )
Restic Annotations
const ( // Resources included in the stage backup. // Referenced by the Backup.LabelSelector. The value is the Task.UID(). IncludedInStageBackupLabel = "migration-included-stage-backup" // Designated as an `initial` Backup. // The value is the Task.UID(). InitialBackupLabel = "migration-initial-backup" // Designated as an `stage` Backup. // The value is the Task.UID(). StageBackupLabel = "migration-stage-backup" // Designated as an `stage` Restore. // The value is the Task.UID(). StageRestoreLabel = "migration-stage-restore" // Designated as a `final` Restore. // The value is the Task.UID(). FinalRestoreLabel = "migration-final-restore" // Identifies associated directvolumemigration resource // The value is the Task.UID() DirectVolumeMigrationLabel = "migration-direct-volume" // Identifies the resource as migrated by us // for easy search or application rollback. // The value is the Task.UID(). MigMigrationLabel = "migration.openshift.io/migrated-by-migmigration" // (migmigration UID) // Identifies associated migmigration // to assist manual debugging // The value is Task.Owner.Name MigMigrationDebugLabel = "migration.openshift.io/migmigration-name" // Identifies associated migplan // to assist manual debugging // The value is Task.Owner.Spec.migPlanRef.Name MigPlanDebugLabel = "migration.openshift.io/migplan-name" // Identifies associated migplan // to allow migplan restored resources rollback // The value is Task.PlanResources.MigPlan.UID MigPlanLabel = "migration.openshift.io/migrated-by-migplan" // (migplan UID) // Identifies Pod as a stage pod to allow // for cleanup at migration start and rollback // The value is always "true" if set. StagePodLabel = "migration.openshift.io/is-stage-pod" )
Labels.
const ( MigRegistryAnnotationKey string = "openshift.io/migration-registry" MigRegistryDirAnnotationKey string = "openshift.io/migration-registry-dir" )
Annotations
const ( Created = "" Started = "Started" CleanStaleAnnotations = "CleanStaleAnnotations" CleanStaleVeleroCRs = "CleanStaleVeleroCRs" CleanStaleResticCRs = "CleanStaleResticCRs" CleanStaleStagePods = "CleanStaleStagePods" WaitForStaleStagePodsTerminated = "WaitForStaleStagePodsTerminated" StartRefresh = "StartRefresh" WaitForRefresh = "WaitForRefresh" CreateRegistries = "CreateRegistries" CreateDirectImageMigration = "CreateDirectImageMigration" WaitForDirectImageMigrationToComplete = "WaitForDirectImageMigrationToComplete" EnsureCloudSecretPropagated = "EnsureCloudSecretPropagated" PreBackupHooks = "PreBackupHooks" PostBackupHooks = "PostBackupHooks" PreRestoreHooks = "PreRestoreHooks" PostRestoreHooks = "PostRestoreHooks" PreBackupHooksFailed = "PreBackupHooksFailed" PostBackupHooksFailed = "PostBackupHooksFailed" PreRestoreHooksFailed = "PreRestoreHooksFailed" PostRestoreHooksFailed = "PostRestoreHooksFailed" EnsureInitialBackup = "EnsureInitialBackup" InitialBackupCreated = "InitialBackupCreated" InitialBackupFailed = "InitialBackupFailed" AnnotateResources = "AnnotateResources" EnsureStagePodsFromRunning = "EnsureStagePodsFromRunning" EnsureStagePodsFromTemplates = "EnsureStagePodsFromTemplates" EnsureStagePodsFromOrphanedPVCs = "EnsureStagePodsFromOrphanedPVCs" StagePodsCreated = "StagePodsCreated" StagePodsFailed = "StagePodsFailed" SourceStagePodsFailed = "SourceStagePodsFailed" RestartVelero = "RestartVelero" WaitForVeleroReady = "WaitForVeleroReady" RestartRestic = "RestartRestic" WaitForResticReady = "WaitForResticReady" QuiesceApplications = "QuiesceApplications" EnsureQuiesced = "EnsureQuiesced" UnQuiesceSrcApplications = "UnQuiesceSrcApplications" UnQuiesceDestApplications = "UnQuiesceDestApplications" WaitForRegistriesReady = "WaitForRegistriesReady" EnsureStageBackup = "EnsureStageBackup" StageBackupCreated = "StageBackupCreated" StageBackupFailed = "StageBackupFailed" EnsureInitialBackupReplicated = "EnsureInitialBackupReplicated" EnsureStageBackupReplicated = "EnsureStageBackupReplicated" EnsureStageRestore = "EnsureStageRestore" StageRestoreCreated = "StageRestoreCreated" StageRestoreFailed = "StageRestoreFailed" CreateDirectVolumeMigration = "CreateDirectVolumeMigration" WaitForDirectVolumeMigrationToComplete = "WaitForDirectVolumeMigrationToComplete" DirectVolumeMigrationFailed = "DirectVolumeMigrationFailed" EnsureFinalRestore = "EnsureFinalRestore" FinalRestoreCreated = "FinalRestoreCreated" FinalRestoreFailed = "FinalRestoreFailed" Verification = "Verification" EnsureStagePodsDeleted = "EnsureStagePodsDeleted" EnsureStagePodsTerminated = "EnsureStagePodsTerminated" EnsureAnnotationsDeleted = "EnsureAnnotationsDeleted" EnsureMigratedDeleted = "EnsureMigratedDeleted" DeleteRegistries = "DeleteRegistries" DeleteMigrated = "DeleteMigrated" DeleteBackups = "DeleteBackups" DeleteRestores = "DeleteRestores" DeleteHookJobs = "DeleteHookJobs" MigrationFailed = "MigrationFailed" Canceling = "Canceling" Canceled = "Canceled" Rollback = "Rollback" Completed = "Completed" )
Phases
const ( Quiesce = 0x001 // Only when QuiescePods (true). HasStagePods = 0x002 // Only when stage pods created. HasPVs = 0x004 // Only when PVs migrated. HasVerify = 0x008 // Only when the plan has enabled verification HasISs = 0x010 // Only when ISs migrated DirectImage = 0x020 // Only when using direct image migration IndirectImage = 0x040 // Only when using indirect image migration DirectVolume = 0x080 // Only when using direct volume migration IndirectVolume = 0x100 // Only when using indirect volume migration HasStageBackup = 0x200 // True when stage backup is needed )
Flags
const ( StepPrepare = "Prepare" StepDirectImage = "DirectImage" StepDirectVolume = "DirectVolume" StepBackup = "Backup" StepStageBackup = "StageBackup" StepStageRestore = "StageRestore" StepRestore = "Restore" StepCleanup = "Cleanup" StepCleanupVelero = "CleanupVelero" StepCleanupHelpers = "CleanupHelpers" StepCleanupMigrated = "CleanupMigrated" StepCleanupUnquiesce = "CleanupUnquiesce" )
Migration steps
const ( UnhealthyNamespaces = "UnhealthyNamespaces" InvalidPlanRef = "InvalidPlanRef" PlanNotReady = "PlanNotReady" PlanClosed = "PlanClosed" HasFinalMigration = "HasFinalMigration" Postponed = "Postponed" Running = "Running" Succeeded = "Succeeded" SucceededWithWarnings = "SucceededWithWarnings" Failed = "Failed" ResticErrors = "ResticErrors" ResticVerifyErrors = "ResticVerifyErrors" VeleroInitialBackupPartiallyFailed = "VeleroInitialBackupPartiallyFailed" VeleroStageBackupPartiallyFailed = "VeleroStageBackupPartiallyFailed" VeleroStageRestorePartiallyFailed = "VeleroStageRestorePartiallyFailed" VeleroFinalRestorePartiallyFailed = "VeleroFinalRestorePartiallyFailed" DirectImageMigrationFailed = "DirectImageMigrationFailed" StageNoOp = "StageNoOp" RegistriesHealthy = "RegistriesHealthy" RegistriesUnhealthy = "RegistriesUnhealthy" StaleSrcVeleroCRsDeleted = "StaleSrcVeleroCRsDeleted" StaleDestVeleroCRsDeleted = "StaleDestVeleroCRsDeleted" StaleResticCRsDeleted = "StaleResticCRsDeleted" )
Types
const ( Critical = migapi.Critical Advisory = migapi.Advisory )
Categories
const ( NotSet = "NotSet" NotFound = "NotFound" Cancel = "Cancel" ErrorsDetected = "ErrorsDetected" )
Reasons
const ( True = migapi.True False = migapi.False )
Statuses
const AnnotationsPerReconcile = 50
Bucket limit for number of items annotated in one Reconcile
const BackoffLimitExceededError = "BackoffLimitExceeded"
const HookJobFailedLimit = 6
Variables ¶
var CancelItinerary = Itinerary{ Name: "Cancel", Phases: []Phase{ {Name: Canceling, Step: StepCleanupVelero}, {Name: DeleteBackups, Step: StepCleanupVelero}, {Name: DeleteRestores, Step: StepCleanupVelero}, {Name: DeleteRegistries, Step: StepCleanupHelpers}, {Name: DeleteHookJobs, Step: StepCleanupHelpers}, {Name: EnsureStagePodsDeleted, Step: StepCleanupHelpers, /* contains filtered or unexported fields */}, {Name: EnsureAnnotationsDeleted, Step: StepCleanupHelpers, /* contains filtered or unexported fields */}, {Name: Canceled, Step: StepCleanup}, {Name: Completed, Step: StepCleanup}, }, }
var FailedItinerary = Itinerary{ Name: "Failed", Phases: []Phase{ {Name: MigrationFailed, Step: StepCleanupHelpers}, {Name: DeleteRegistries, Step: StepCleanupHelpers}, {Name: EnsureAnnotationsDeleted, Step: StepCleanupHelpers, /* contains filtered or unexported fields */}, {Name: Completed, Step: StepCleanup}, }, }
var FastReQ = time.Duration(time.Millisecond * 100)
Requeue
var FinalItinerary = Itinerary{ Name: "Final", Phases: []Phase{ {Name: Created, Step: StepPrepare}, {Name: Started, Step: StepPrepare}, {Name: StartRefresh, Step: StepPrepare}, {Name: WaitForRefresh, Step: StepPrepare}, {Name: CleanStaleAnnotations, Step: StepPrepare}, {Name: CleanStaleResticCRs, Step: StepPrepare}, {Name: CleanStaleVeleroCRs, Step: StepPrepare}, {Name: RestartVelero, Step: StepPrepare}, {Name: CleanStaleStagePods, Step: StepPrepare}, {Name: WaitForStaleStagePodsTerminated, Step: StepPrepare}, {Name: CreateRegistries, Step: StepPrepare, /* contains filtered or unexported fields */}, {Name: WaitForVeleroReady, Step: StepPrepare}, {Name: WaitForResticReady, Step: StepPrepare, /* contains filtered or unexported fields */}, {Name: WaitForRegistriesReady, Step: StepPrepare, /* contains filtered or unexported fields */}, {Name: EnsureCloudSecretPropagated, Step: StepPrepare}, {Name: PreBackupHooks, Step: StepBackup}, {Name: CreateDirectImageMigration, Step: StepBackup, /* contains filtered or unexported fields */}, {Name: EnsureInitialBackup, Step: StepBackup}, {Name: InitialBackupCreated, Step: StepBackup}, {Name: EnsureStagePodsFromRunning, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStagePodsFromTemplates, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStagePodsFromOrphanedPVCs, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: StagePodsCreated, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: AnnotateResources, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: QuiesceApplications, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureQuiesced, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: CreateDirectVolumeMigration, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStageBackup, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: StageBackupCreated, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStageBackupReplicated, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStageRestore, Step: StepStageRestore, /* contains filtered or unexported fields */}, {Name: StageRestoreCreated, Step: StepStageRestore, /* contains filtered or unexported fields */}, {Name: EnsureStagePodsDeleted, Step: StepStageRestore, /* contains filtered or unexported fields */}, {Name: EnsureStagePodsTerminated, Step: StepStageRestore, /* contains filtered or unexported fields */}, {Name: WaitForDirectImageMigrationToComplete, Step: StepDirectImage, /* contains filtered or unexported fields */}, {Name: WaitForDirectVolumeMigrationToComplete, Step: StepDirectVolume, /* contains filtered or unexported fields */}, {Name: EnsureAnnotationsDeleted, Step: StepRestore, /* contains filtered or unexported fields */}, {Name: EnsureInitialBackupReplicated, Step: StepRestore}, {Name: PostBackupHooks, Step: StepRestore}, {Name: PreRestoreHooks, Step: StepRestore}, {Name: EnsureFinalRestore, Step: StepRestore}, {Name: FinalRestoreCreated, Step: StepRestore}, {Name: UnQuiesceDestApplications, Step: StepRestore}, {Name: PostRestoreHooks, Step: StepRestore}, {Name: DeleteRegistries, Step: StepCleanup}, {Name: Verification, Step: StepCleanup, /* contains filtered or unexported fields */}, {Name: Completed, Step: StepCleanup}, }, }
var NoReQ = time.Duration(0)
var PhaseDescriptions = map[string]string{
Started: "Migration started.",
StartRefresh: "Starting refresh on MigPlan, MigStorage and MigCluster resources",
WaitForRefresh: "Waiting for refresh of MigPlan, MigStorage and MigCluster resources to complete",
CleanStaleAnnotations: "Removing leftover migration annotations and labels from PVs, PVCs, Pods, ImageStreams, and Namespaces. Annotations and labels provide migration instructions to Velero, Velero Plugins and Restic.",
CleanStaleResticCRs: "Deleting incomplete Restic PodVolumeBackups and PodVolumeRestores created by past migration attempts.",
CleanStaleVeleroCRs: "Deleting incomplete Velero Backups and Restores created by past migration attempts.",
CleanStaleStagePods: "Deleting any leftover stage Pods.",
WaitForStaleStagePodsTerminated: "Waiting for leftover stage Pod deletion to finish.",
CreateRegistries: "Creating migration registries on source and target clusters.",
WaitForRegistriesReady: "Waiting for migration registries on source and target clusters to become healthy.",
DeleteRegistries: "Deleting migration registries on source and target clusters.",
EnsureCloudSecretPropagated: "Ensuring Velero has latest Replication Repository storage credentials.",
PreBackupHooks: "Waiting for user-defined pre-backup hooks to complete.",
PostBackupHooks: "Waiting for user-defined post-backup hooks to complete.",
PreRestoreHooks: "Waiting for user-defined pre-restore hooks to complete.",
PostRestoreHooks: "Waiting for user-defined post-restore hooks to complete.",
PreBackupHooksFailed: "Migration failed while running user-defined pre-backup hooks.",
PostBackupHooksFailed: "Migration failed while running user-defined post-backup hooks.",
PreRestoreHooksFailed: "Migration failed while running user-defined pre-restore hooks.",
PostRestoreHooksFailed: "Migration failed while running user-defined post-restore hooks.",
EnsureInitialBackup: "Creating initial Velero backup.",
InitialBackupCreated: "Waiting for initial Velero backup to complete.",
InitialBackupFailed: "Migration failed during initial Velero backup.",
AnnotateResources: "Adding migration annotations and labels to PVs, PVCs, Pods, ImageStreams, and Namespaces. Annotations and labels provide migration instructions to Velero, Velero Plugins and Restic.",
EnsureStagePodsFromRunning: "Creating Stage Pods and mounting PVC data from running Pods.",
EnsureStagePodsFromTemplates: "Creating Stage Pods and mounting PVC data using Pod templates from DeploymentTemplates, DeploymentConfigs, ReplicationControllers, DaemonSets, StatefulSets, ReplicaSets, CronJobs and Jobs.",
EnsureStagePodsFromOrphanedPVCs: "Creating Stage Pods and mounting PVC data from unmounted PVCs.",
StagePodsCreated: "Waiting for all Stage Pods to start.",
StagePodsFailed: "Migration failed due to some Stage Pods failing to start.",
RestartRestic: "Restarting Restic Pods, ensuring latest PVC mounts are available for PVC backups.",
WaitForResticReady: "Waiting for Restic Pods to restart, ensuring latest PVC mounts are available for PVC backups.",
RestartVelero: "Restarting Velero Pods, ensuring work queue is empty.",
WaitForVeleroReady: "Waiting for Velero Pods to restart, ensuring work queue is empty.",
QuiesceApplications: "Quiescing (Scaling to 0 replicas): Deployments, DeploymentConfigs, StatefulSets, ReplicaSets, DaemonSets, CronJobs and Jobs.",
EnsureQuiesced: "Waiting for Quiesce (Scaling to 0 replicas) to finish for Deployments, DeploymentConfigs, StatefulSets, ReplicaSets, DaemonSets, CronJobs and Jobs.",
UnQuiesceSrcApplications: "UnQuiescing (Scaling to N replicas) source cluster Deployments, DeploymentConfigs, StatefulSets, ReplicaSets, DaemonSets, CronJobs and Jobs.",
UnQuiesceDestApplications: "UnQuiescing (Scaling to N replicas) target cluster Deployments, DeploymentConfigs, StatefulSets, ReplicaSets, DaemonSets, CronJobs and Jobs.",
EnsureStageBackup: "Creating a stage backup.",
StageBackupCreated: "Waiting for stage backup to complete.",
StageBackupFailed: "Migration failed during stage backup.",
EnsureInitialBackupReplicated: "Waiting for initial Velero backup replication to target cluster.",
EnsureStageBackupReplicated: "Waiting for stage Velero backup replication to target cluster.",
EnsureStageRestore: "Creating a stage Velero restore including OpenShift resources and PVCs.",
StageRestoreCreated: "Waiting for stage Velero restore to complete.",
StageRestoreFailed: "Migration failed during stage Velero restore.",
EnsureFinalRestore: "Creating final Velero restore.",
FinalRestoreCreated: "Waiting for final Velero restore to complete.",
FinalRestoreFailed: "Migration failed during final Velero restore.",
Verification: "Verifying health of migrated Pods.",
Rollback: "Starting rollback",
EnsureStagePodsDeleted: "Deleting any leftover stage Pods.",
EnsureStagePodsTerminated: "Waiting for leftover stage Pod deletion to finish.",
EnsureAnnotationsDeleted: "Removing migration annotations and labels from PVs, PVCs, Pods, ImageStreams, and Namespaces. Annotations and labels provide migration instructions to Velero, Velero Plugins and Restic.",
EnsureMigratedDeleted: "Rolling back. Waiting for migrated resource deletion.",
DeleteMigrated: "Rolling back. Deleting migrated resources from target cluster.",
DeleteBackups: "Deleting Velero Backups created during migration.",
DeleteRestores: "Deleting Velero Restores created during migration.",
DeleteHookJobs: "Deleting user-defined hook Jobs and Pods created during migration.",
MigrationFailed: "Migration failed.",
Canceling: "Migration cancellation in progress.",
Canceled: "Migration canceled.",
Completed: "Migration completed.",
}
PhaseDescriptions are human readable strings that describe a phase
var PollReQ = time.Duration(time.Second * 3)
var RollbackItinerary = Itinerary{ Name: "Rollback", Phases: []Phase{ {Name: Rollback, Step: StepCleanupVelero}, {Name: DeleteBackups, Step: StepCleanupVelero}, {Name: DeleteRestores, Step: StepCleanupVelero}, {Name: DeleteRegistries, Step: StepCleanupHelpers}, {Name: EnsureStagePodsDeleted, Step: StepCleanupHelpers}, {Name: EnsureAnnotationsDeleted, Step: StepCleanupHelpers, /* contains filtered or unexported fields */}, {Name: DeleteMigrated, Step: StepCleanupMigrated}, {Name: EnsureMigratedDeleted, Step: StepCleanupMigrated}, {Name: UnQuiesceSrcApplications, Step: StepCleanupUnquiesce}, {Name: Completed, Step: StepCleanup}, }, }
var StageItinerary = Itinerary{ Name: "Stage", Phases: []Phase{ {Name: Created, Step: StepPrepare}, {Name: Started, Step: StepPrepare}, {Name: StartRefresh, Step: StepPrepare}, {Name: WaitForRefresh, Step: StepPrepare}, {Name: CleanStaleAnnotations, Step: StepPrepare}, {Name: CleanStaleResticCRs, Step: StepPrepare}, {Name: CleanStaleVeleroCRs, Step: StepPrepare}, {Name: RestartVelero, Step: StepPrepare}, {Name: CleanStaleStagePods, Step: StepPrepare}, {Name: WaitForStaleStagePodsTerminated, Step: StepPrepare}, {Name: CreateRegistries, Step: StepPrepare, /* contains filtered or unexported fields */}, {Name: CreateDirectImageMigration, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: CreateDirectVolumeMigration, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStagePodsFromRunning, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStagePodsFromTemplates, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStagePodsFromOrphanedPVCs, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: StagePodsCreated, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: AnnotateResources, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: WaitForVeleroReady, Step: StepStageBackup}, {Name: WaitForResticReady, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: WaitForRegistriesReady, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureCloudSecretPropagated, Step: StepStageBackup}, {Name: QuiesceApplications, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureQuiesced, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStageBackup, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: StageBackupCreated, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStageBackupReplicated, Step: StepStageBackup, /* contains filtered or unexported fields */}, {Name: EnsureStageRestore, Step: StepStageRestore, /* contains filtered or unexported fields */}, {Name: StageRestoreCreated, Step: StepStageRestore, /* contains filtered or unexported fields */}, {Name: WaitForDirectImageMigrationToComplete, Step: StepDirectImage, /* contains filtered or unexported fields */}, {Name: WaitForDirectVolumeMigrationToComplete, Step: StepDirectVolume, /* contains filtered or unexported fields */}, {Name: DeleteRegistries, Step: StepCleanup}, {Name: EnsureStagePodsDeleted, Step: StepCleanup, /* contains filtered or unexported fields */}, {Name: EnsureStagePodsTerminated, Step: StepCleanup, /* contains filtered or unexported fields */}, {Name: EnsureAnnotationsDeleted, Step: StepCleanup, /* contains filtered or unexported fields */}, {Name: Completed, Step: StepCleanup}, }, }
Functions ¶
Types ¶
type Itinerary ¶
Itinerary defines itinerary
func (*Itinerary) GetStepForPhase ¶
GetStepForPhase returns which high level step current phase belongs to
type MigrationPredicate ¶
func (MigrationPredicate) Create ¶
func (r MigrationPredicate) Create(e event.CreateEvent) bool
func (MigrationPredicate) Delete ¶
func (r MigrationPredicate) Delete(e event.DeleteEvent) bool
func (MigrationPredicate) Update ¶
func (r MigrationPredicate) Update(e event.UpdateEvent) bool
type Phase ¶
type Phase struct { // A phase name. Name string // High level Step this phase belongs to Step string // contains filtered or unexported fields }
Phase defines phase in the migration
type PlanPredicate ¶
func (PlanPredicate) Create ¶
func (r PlanPredicate) Create(e event.CreateEvent) bool
func (PlanPredicate) Update ¶
func (r PlanPredicate) Update(e event.UpdateEvent) bool
type PodStartReport ¶
type PodStartReport struct {
// contains filtered or unexported fields
}
Stage pod start report.
type ReconcileMigMigration ¶
type ReconcileMigMigration struct { client.Client record.EventRecorder // contains filtered or unexported fields }
ReconcileMigMigration reconciles a MigMigration object
type ServiceAccounts ¶
Set of Service Accounts. Keyed by namespace (name) with value of map keyed by SA name.
type StagePodList ¶
type StagePodList []StagePod
StagePodList - a list of stage pods, with built-in stage pod deduplication
type Task ¶
type Task struct { Log logr.Logger Client k8sclient.Client Owner *migapi.MigMigration PlanResources *migapi.PlanResources Annotations map[string]string BackupResources mapset.Set Phase string Requeue time.Duration Itinerary Itinerary Errors []string Step string }
A Velero task that provides the complete backup & restore workflow. Log - A controller's logger. Client - A controller's (local) client. Owner - A MigMigration resource. PlanResources - A PlanRefResources. Annotations - Map of annotations to applied to the backup & restore BackupResources - Resource types to be included in the backup. Phase - The task phase. Requeue - The requeueAfter duration. 0 indicates no requeue. Itinerary - The phase itinerary. Errors - Migration errors. Failed - Task phase has failed.
func (*Task) Run ¶
Run the task. Each call will:
- Run the current phase.
- Update the phase to the next phase.
- Set the Requeue (as appropriate).
- Return.
func (*Task) VerificationCompleted ¶
VerificationCompleted will determine when the verification should be stopped