Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the migration v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/konveyor/mig-controller/pkg/apis/migration +k8s:defaulter-gen=TypeMeta +groupName=migration.openshift.io
Package v1alpha1 contains API Schema definitions for the migration v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/konveyor/mig-controller/pkg/apis/migration +k8s:defaulter-gen=TypeMeta +groupName=migration.openshift.io
Index ¶
- Constants
- Variables
- func AreRestConfigsEqual(c1, c2 *rest.Config) bool
- func CorrelationLabel(r interface{}, uid types.UID) (key, value string)
- func GetAccessModesForVolumeMode(volumeMode kapi.PersistentVolumeMode, volumeAccessModes []VolumeModeAccessMode) []kapi.PersistentVolumeAccessMode
- func GetImageStream(client k8sclient.Client, ref *kapi.ObjectReference) (*imagev1.ImageStream, error)
- func GetSecret(client k8sclient.Client, ref *kapi.ObjectReference) (*kapi.Secret, error)
- func Resource(resource string) schema.GroupResource
- func SetOwnerReference(owner metav1.Object, ownerType runtime.Object, dim metav1.Object)
- type BackupStorageConfig
- type Condition
- type Conditions
- func (r *Conditions) BeginStagingConditions()
- func (in *Conditions) DeepCopy() *Conditions
- func (in *Conditions) DeepCopyInto(out *Conditions)
- func (r *Conditions) DeleteCondition(types ...string)
- func (r *Conditions) EndStagingConditions()
- func (r *Conditions) FindCondition(cndType string) *Condition
- func (r *Conditions) FindConditionByCategory(cndCategory string) []*Condition
- func (r *Conditions) HasAnyCondition(types ...string) bool
- func (r *Conditions) HasBlockerCondition() bool
- func (r *Conditions) HasCondition(types ...string) bool
- func (r *Conditions) HasConditionCategory(names ...string) bool
- func (r *Conditions) HasCriticalCondition(category ...string) bool
- func (r *Conditions) HasErrorCondition(category ...string) bool
- func (r *Conditions) HasWarnCondition(category ...string) bool
- func (r *Conditions) IsReady() bool
- func (r *Conditions) RecordEvents(obj runtime.Object, recorder record.EventRecorder)
- func (r *Conditions) SetCondition(condition Condition)
- func (r *Conditions) SetReady(ready bool, message string)
- func (r *Conditions) SetReconcileFailed(err error)
- func (r *Conditions) StageCondition(types ...string)
- type DirectImageMigration
- func (r *DirectImageMigration) AddErrors(errors []string)
- func (in *DirectImageMigration) DeepCopy() *DirectImageMigration
- func (in *DirectImageMigration) DeepCopyInto(out *DirectImageMigration)
- func (in *DirectImageMigration) DeepCopyObject() runtime.Object
- func (r *DirectImageMigration) DirectImageStreamMigrationLabels(is imagev1.ImageStream) map[string]string
- func (r *DirectImageMigration) GetCorrelationLabel() (string, string)
- func (r *DirectImageMigration) GetCorrelationLabels() map[string]string
- func (r *DirectImageMigration) GetDestinationCluster(client k8sclient.Client) (*MigCluster, error)
- func (r *DirectImageMigration) GetDestinationNamespaces() []string
- func (r *DirectImageMigration) GetMigrationForDIM(client k8sclient.Client) (*MigMigration, error)
- func (r *DirectImageMigration) GetName() string
- func (r *DirectImageMigration) GetNamespace() string
- func (r *DirectImageMigration) GetNamespaceMapping() map[string]string
- func (r *DirectImageMigration) GetSourceCluster(client k8sclient.Client) (*MigCluster, error)
- func (r *DirectImageMigration) GetSourceNamespaces() []string
- func (r *DirectImageMigration) HasCompleted() (bool, []string, []string)
- func (r *DirectImageMigration) HasErrors() bool
- func (r *DirectImageMigration) HasReconciled() bool
- func (r *DirectImageMigration) MarkReconciled()
- type DirectImageMigrationList
- type DirectImageMigrationSpec
- type DirectImageMigrationStatus
- type DirectImageStreamMigration
- func (r *DirectImageStreamMigration) AddErrors(errors []string)
- func (in *DirectImageStreamMigration) DeepCopy() *DirectImageStreamMigration
- func (in *DirectImageStreamMigration) DeepCopyInto(out *DirectImageStreamMigration)
- func (in *DirectImageStreamMigration) DeepCopyObject() runtime.Object
- func (r *DirectImageStreamMigration) GetCorrelationLabel() (string, string)
- func (r *DirectImageStreamMigration) GetCorrelationLabels() map[string]string
- func (r *DirectImageStreamMigration) GetDIMforDISM(client k8sclient.Client) (*DirectImageMigration, error)
- func (r *DirectImageStreamMigration) GetDestinationCluster(client k8sclient.Client) (*MigCluster, error)
- func (r *DirectImageStreamMigration) GetDestinationNamespace() string
- func (r *DirectImageStreamMigration) GetImageStream(c k8sclient.Client) (*imagev1.ImageStream, error)
- func (r *DirectImageStreamMigration) GetMigrationForDISM(client k8sclient.Client) (*MigMigration, error)
- func (r *DirectImageStreamMigration) GetName() string
- func (r *DirectImageStreamMigration) GetNamespace() string
- func (r *DirectImageStreamMigration) GetSourceCluster(client k8sclient.Client) (*MigCluster, error)
- func (r *DirectImageStreamMigration) HasCompleted() (bool, []string)
- func (r *DirectImageStreamMigration) HasErrors() bool
- func (r *DirectImageStreamMigration) HasReconciled() bool
- func (r *DirectImageStreamMigration) MarkReconciled()
- type DirectImageStreamMigrationList
- type DirectImageStreamMigrationSpec
- type DirectImageStreamMigrationStatus
- type DirectVolumeMigration
- func (r *DirectVolumeMigration) AddErrors(errors []string)
- func (dvm *DirectVolumeMigration) AllReportingCompleted() bool
- func (in *DirectVolumeMigration) DeepCopy() *DirectVolumeMigration
- func (in *DirectVolumeMigration) DeepCopyInto(out *DirectVolumeMigration)
- func (in *DirectVolumeMigration) DeepCopyObject() runtime.Object
- func (r *DirectVolumeMigration) GetCorrelationLabel() (string, string)
- func (r *DirectVolumeMigration) GetCorrelationLabels() map[string]string
- func (r *DirectVolumeMigration) GetDestinationCluster(client k8sclient.Client) (*MigCluster, error)
- func (r *DirectVolumeMigration) GetDestinationNamespaces() []string
- func (r *DirectVolumeMigration) GetMigrationForDVM(client k8sclient.Client) (*MigMigration, error)
- func (r *DirectVolumeMigration) GetName() string
- func (r *DirectVolumeMigration) GetNamespace() string
- func (r *DirectVolumeMigration) GetSourceCluster(client k8sclient.Client) (*MigCluster, error)
- func (r *DirectVolumeMigration) GetSourceNamespaces() []string
- func (r *DirectVolumeMigration) HasErrors() bool
- func (r *DirectVolumeMigration) HasReconciled() bool
- func (dvm *DirectVolumeMigration) IsCompleted() bool
- func (dvm *DirectVolumeMigration) IsCutover() bool
- func (dvm *DirectVolumeMigration) IsLiveMigrate() bool
- func (dvm *DirectVolumeMigration) IsRollback() bool
- func (dvm *DirectVolumeMigration) IsStage() bool
- func (r *DirectVolumeMigration) MarkReconciled()
- func (dvm *DirectVolumeMigration) SkipVolume(volumeName, namespace string)
- type DirectVolumeMigrationList
- type DirectVolumeMigrationProgress
- func (in *DirectVolumeMigrationProgress) DeepCopy() *DirectVolumeMigrationProgress
- func (in *DirectVolumeMigrationProgress) DeepCopyInto(out *DirectVolumeMigrationProgress)
- func (in *DirectVolumeMigrationProgress) DeepCopyObject() runtime.Object
- func (r *DirectVolumeMigrationProgress) GetDVMforDVMP(client k8sclient.Client) (*DirectVolumeMigration, error)
- func (r *DirectVolumeMigrationProgress) GetMigrationforDVMP(client k8sclient.Client) (*MigMigration, error)
- func (d *DirectVolumeMigrationProgress) MarkReconciled()
- type DirectVolumeMigrationProgressList
- type DirectVolumeMigrationProgressSpec
- type DirectVolumeMigrationProgressStatus
- type DirectVolumeMigrationSpec
- type DirectVolumeMigrationStatus
- func (ds *DirectVolumeMigrationStatus) AddRsyncOperation(podStatus *RsyncOperation)
- func (in *DirectVolumeMigrationStatus) DeepCopy() *DirectVolumeMigrationStatus
- func (in *DirectVolumeMigrationStatus) DeepCopyInto(out *DirectVolumeMigrationStatus)
- func (ds *DirectVolumeMigrationStatus) GetRsyncOperationStatusForPVC(pvcRef *kapi.ObjectReference) *RsyncOperation
- type DirectVolumeMigrationType
- type EndpointType
- type ImageStreamListItem
- type Incompatible
- type IncompatibleGVK
- type IncompatibleNamespace
- type LiveMigrationProgress
- type MigAnalytic
- func (in *MigAnalytic) DeepCopy() *MigAnalytic
- func (in *MigAnalytic) DeepCopyInto(out *MigAnalytic)
- func (in *MigAnalytic) DeepCopyObject() runtime.Object
- func (r *MigAnalytic) GetCorrelationLabel() (string, string)
- func (r *MigAnalytic) GetCorrelationLabels() map[string]string
- func (r *MigAnalytic) GetName() string
- func (r *MigAnalytic) GetNamespace() string
- func (r *MigAnalytic) HasReconciled() bool
- func (r *MigAnalytic) MarkReconciled()
- type MigAnalyticList
- type MigAnalyticNSImage
- type MigAnalyticNSResource
- type MigAnalyticNamespace
- type MigAnalyticPersistentVolumeClaim
- type MigAnalyticPlan
- type MigAnalyticSpec
- type MigAnalyticStatus
- type MigCluster
- func (m *MigCluster) BuildRestConfig(c k8sclient.Client) (*rest.Config, error)
- func (in *MigCluster) DeepCopy() *MigCluster
- func (in *MigCluster) DeepCopyInto(out *MigCluster)
- func (in *MigCluster) DeepCopyObject() runtime.Object
- func (m *MigCluster) DeleteResources(client k8sclient.Client, labels map[string]string) error
- func (m *MigCluster) GetClient(c k8sclient.Client) (compat.Client, error)
- func (m *MigCluster) GetClusterConfigMap(c k8sclient.Client) (*kapi.ConfigMap, error)
- func (m *MigCluster) GetClusterSubdomain(c k8sclient.Client) (string, error)
- func (r *MigCluster) GetCorrelationLabel() (string, string)
- func (r *MigCluster) GetCorrelationLabels() map[string]string
- func (m *MigCluster) GetInternalRegistryPath(c k8sclient.Client) (string, error)
- func (r *MigCluster) GetKubeStorageClasses(client k8sclient.Client) ([]storageapi.StorageClass, error)
- func (r *MigCluster) GetName() string
- func (r *MigCluster) GetNamespace() string
- func (r *MigCluster) GetObjectReference() *kapi.ObjectReference
- func (m *MigCluster) GetOperatorVersion(c k8sclient.Client) (string, error)
- func (m *MigCluster) GetRegistryImage(c k8sclient.Client) (string, error)
- func (m *MigCluster) GetRegistryLivenessTimeout(c k8sclient.Client) (int32, error)
- func (m *MigCluster) GetRegistryPath(c k8sclient.Client) (string, error)
- func (m *MigCluster) GetRegistryReadinessTimeout(c k8sclient.Client) (int32, error)
- func (m *MigCluster) GetRsyncTransferImage(c k8sclient.Client) (string, error)
- func (m *MigCluster) GetServiceAccountSecret(client k8sclient.Client) (*kapi.Secret, error)
- func (r *MigCluster) GetStorageClasses(client k8sclient.Client) ([]StorageClass, error)
- func (r *MigCluster) HasReconciled() bool
- func (r *MigCluster) MarkReconciled()
- func (m *MigCluster) OperatorVersionMatchesConfigmap(c k8sclient.Client) (bool, error)
- func (m *MigCluster) SetOperatorVersion(c k8sclient.Client) error
- func (m *MigCluster) SetRegistryPath(c k8sclient.Client) error
- func (m *MigCluster) TestConnection(c k8sclient.Client, timeout time.Duration) error
- func (r *MigCluster) UpdateProvider(provider pvdr.Provider)
- type MigClusterList
- type MigClusterSpec
- type MigClusterStatus
- type MigHook
- func (in *MigHook) DeepCopy() *MigHook
- func (in *MigHook) DeepCopyInto(out *MigHook)
- func (in *MigHook) DeepCopyObject() runtime.Object
- func (r *MigHook) GetCorrelationLabel() (string, string)
- func (r *MigHook) GetCorrelationLabels() map[string]string
- func (r *MigHook) GetName() string
- func (r *MigHook) GetNamespace() string
- func (r *MigHook) GetPhaseConfigMap(client k8sclient.Client, phase string, owner string) (*corev1.ConfigMap, error)
- func (r *MigHook) GetPhaseJob(client k8sclient.Client, phase string, owner string) (*batchv1.Job, error)
- func (r *MigHook) HasReconciled() bool
- func (r *MigHook) MarkReconciled()
- type MigHookList
- type MigHookSpec
- type MigHookStatus
- type MigMigration
- func (r *MigMigration) AddErrors(errors []string)
- func (in *MigMigration) DeepCopy() *MigMigration
- func (in *MigMigration) DeepCopyInto(out *MigMigration)
- func (in *MigMigration) DeepCopyObject() runtime.Object
- func (r *MigMigration) GetCorrelationLabel() (string, string)
- func (r *MigMigration) GetCorrelationLabels() map[string]string
- func (r *MigMigration) GetName() string
- func (r *MigMigration) GetNamespace() string
- func (r *MigMigration) GetPlan(client k8sclient.Client) (*MigPlan, error)
- func (r *MigMigration) HasErrors() bool
- func (r *MigMigration) HasReconciled() bool
- func (m *MigMigration) IsHealthy() bool
- func (r *MigMigration) IsStateMigration() bool
- func (r *MigMigration) MarkReconciled()
- type MigMigrationList
- type MigMigrationSpec
- type MigMigrationStatus
- type MigPlan
- func (r *MigPlan) BuildRegistryDeployment(storage *MigStorage, proxySecret *kapi.Secret, ...) *appsv1.Deployment
- func (r *MigPlan) BuildRegistrySecret(client k8sclient.Client, storage *MigStorage) (*kapi.Secret, error)
- func (r *MigPlan) BuildRegistryService(name string) *kapi.Service
- func (in *MigPlan) DeepCopy() *MigPlan
- func (in *MigPlan) DeepCopyInto(out *MigPlan)
- func (in *MigPlan) DeepCopyObject() runtime.Object
- func (r *MigPlan) EqualsRegistryDeployment(a, b *appsv1.Deployment) bool
- func (r *MigPlan) EqualsRegistrySecret(a, b *kapi.Secret) bool
- func (r *MigPlan) EqualsRegistryService(a, b *kapi.Service) bool
- func (r *MigPlan) GetBSL(client k8sclient.Client) (*velero.BackupStorageLocation, error)
- func (r *MigPlan) GetCloudSecret(client k8sclient.Client, provider pvdr.Provider) (*kapi.Secret, error)
- func (r *MigPlan) GetCorrelationLabel() (string, string)
- func (r *MigPlan) GetCorrelationLabels() map[string]string
- func (r *MigPlan) GetDestinationCluster(client k8sclient.Client) (*MigCluster, error)
- func (r *MigPlan) GetDestinationNamespaces() []string
- func (r *MigPlan) GetIncludedResourcesList(client k8sclient.Client) (validResources []string, invalidResources []string, err error)
- func (r *MigPlan) GetMigrationType() MigrationType
- func (r *MigPlan) GetName() string
- func (r *MigPlan) GetNamespace() string
- func (r *MigPlan) GetNamespaceMapping() map[string]string
- func (r *MigPlan) GetProxySecret(client k8sclient.Client) (*kapi.Secret, error)
- func (r *MigPlan) GetRefResources(client k8sclient.Client) (*PlanResources, error)
- func (r *MigPlan) GetRegistryDeployment(client k8sclient.Client) (*appsv1.Deployment, error)
- func (r *MigPlan) GetRegistrySecret(client k8sclient.Client) (*kapi.Secret, error)
- func (r *MigPlan) GetRegistryService(client k8sclient.Client) (*kapi.Service, error)
- func (r *MigPlan) GetSourceCluster(client k8sclient.Client) (*MigCluster, error)
- func (r *MigPlan) GetSourceNamespaces() []string
- func (r *MigPlan) GetStorage(client k8sclient.Client) (*MigStorage, error)
- func (r *MigPlan) GetSuffix() string
- func (r *MigPlan) GetVSL(client k8sclient.Client) (*velero.VolumeSnapshotLocation, error)
- func (r *MigPlan) HasConflict(plan *MigPlan) bool
- func (r *MigPlan) HasReconciled() bool
- func (r *MigPlan) IsImageMigrationDisabled() bool
- func (r *MigPlan) IsIntraCluster(client k8sclient.Client) (bool, error)
- func (r *MigPlan) IsResourceExcluded(resource string) bool
- func (r *MigPlan) IsVolumeMigrationDisabled() bool
- func (r *MigPlan) ListMigrations(client k8sclient.Client) ([]*MigMigration, error)
- func (r *MigPlan) LiveMigrationChecked() bool
- func (r *MigPlan) MarkReconciled()
- func (r *MigPlan) SetClosed()
- func (r *MigPlan) UpdateRegistryDeployment(storage *MigStorage, deployment *appsv1.Deployment, proxySecret *kapi.Secret, ...)
- func (r *MigPlan) UpdateRegistrySecret(client k8sclient.Client, storage *MigStorage, registrySecret *kapi.Secret) error
- func (r *MigPlan) UpdateRegistryService(service *kapi.Service, name string)
- type MigPlanHook
- type MigPlanList
- type MigPlanSpec
- type MigPlanStatus
- type MigStorage
- func (r *MigStorage) BuildBSL() *velero.BackupStorageLocation
- func (r *MigStorage) BuildBSLCloudSecret() *kapi.Secret
- func (r *MigStorage) BuildVSL(planUID string) *velero.VolumeSnapshotLocation
- func (r *MigStorage) BuildVSLCloudSecret() *kapi.Secret
- func (in *MigStorage) DeepCopy() *MigStorage
- func (in *MigStorage) DeepCopyInto(out *MigStorage)
- func (in *MigStorage) DeepCopyObject() runtime.Object
- func (r *MigStorage) EqualsBSL(a, b *velero.BackupStorageLocation) bool
- func (r *MigStorage) EqualsCloudSecret(a, b *kapi.Secret) bool
- func (r *MigStorage) EqualsVSL(a, b *velero.VolumeSnapshotLocation) bool
- func (r *MigStorage) GetBackupStorageCredSecret(client k8sclient.Client) (*kapi.Secret, error)
- func (r *MigStorage) GetBackupStorageProvider() pvdr.Provider
- func (r *MigStorage) GetCorrelationLabel() (string, string)
- func (r *MigStorage) GetCorrelationLabels() map[string]string
- func (r *MigStorage) GetName() string
- func (r *MigStorage) GetNamespace() string
- func (r *MigStorage) GetVolumeSnapshotCredSecret(client k8sclient.Client) (*kapi.Secret, error)
- func (r *MigStorage) GetVolumeSnapshotProvider() pvdr.Provider
- func (r *MigStorage) HasReconciled() bool
- func (r *MigStorage) MarkReconciled()
- type MigStorageList
- type MigStorageSpec
- type MigStorageStatus
- type MigrationType
- type PV
- type PVC
- type PVCToMigrate
- type PersistentVolumes
- func (r *PersistentVolumes) AddPv(pv PV)
- func (r *PersistentVolumes) BeginPvStaging()
- func (in *PersistentVolumes) DeepCopy() *PersistentVolumes
- func (in *PersistentVolumes) DeepCopyInto(out *PersistentVolumes)
- func (r *PersistentVolumes) DeletePv(names ...string)
- func (r *PersistentVolumes) EndPvStaging()
- func (r *PersistentVolumes) FindPVC(namespace string, name string) *PVC
- func (r *PersistentVolumes) FindPv(pv PV) *PV
- func (r *PersistentVolumes) ResetPvs()
- type PlanResources
- type PodProgress
- type RsyncOperation
- func (in *RsyncOperation) DeepCopy() *RsyncOperation
- func (in *RsyncOperation) DeepCopyInto(out *RsyncOperation)
- func (x *RsyncOperation) Equal(y *RsyncOperation) bool
- func (r *RsyncOperation) GetPVDetails() (string, string)
- func (r *RsyncOperation) IsComplete() bool
- func (r *RsyncOperation) String() string
- type RsyncPodStatus
- type Selection
- type Step
- type StorageClass
- type Supported
- type Timed
- type UnhealthyNamespace
- type UnhealthyResources
- func (u *UnhealthyResources) AddNamespace(cluster *[]UnhealthyNamespace, namespace, name string, resourceNames ...string)
- func (u *UnhealthyResources) AddResources(client k8sclient.Client, unhealthyNamespaces *[]UnhealthyNamespace, ...) error
- func (in *UnhealthyResources) DeepCopy() *UnhealthyResources
- func (in *UnhealthyResources) DeepCopyInto(out *UnhealthyResources)
- func (u *UnhealthyResources) FindResources(namespace string, unhealthyResources ...*[]UnhealthyNamespace) *UnhealthyNamespace
- func (u *UnhealthyResources) FindWorkload(resources *UnhealthyNamespace, name string) *Workload
- type VolumeModeAccessMode
- type VolumeSnapshotConfig
- type Workload
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" PausedAnnotation = "migration.openshift.io/preQuiescePaused" RunStrategyAnnotation = "migration.openshift.io/vm-run-strategy" StartVMAnnotation = "migration.openshift.io/start-vm" NodeSelectorAnnotation = "migration.openshift.io/preQuiesceNodeSelector" StagePodImageAnnotation = "migration.openshift.io/stage-pod-image" ExcludePVCPodAnnotation = "migration.openshift.io/exclude-pvcs" // Exclude PVCs if marked "move" or "snapshot" in the plan )
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 ( // Disables the internal image copy DisableImageCopy = "migration.openshift.io/disable-image-copy" StateMigrationAnnotation = "migration.openshift.io/state-transfer" )
Migration Annotations
const ( ReconcileFailed = "ReconcileFailed" Ready = "Ready" Running = "Running" Failed = "Failed" Succeeded = "Succeeded" )
Types
const ( True = "True" False = "False" )
Status
const ( NotFound = "NotFound" NotSet = "NotSet" NotDistinct = "NotDistinct" NotReady = "NotReady" )
Reasons
const ( Critical = "Critical" Error = "Error" Warn = "Warn" Required = "Required" Advisory = "Advisory" )
Category Critical - Errors that block Reconcile() and the `Ready` condition. Error - Errors that block the `Ready` condition. Warn - Warnings that do not block the `Ready` condition. Required - Required for the `Ready` condition. Advisory - An advisory condition.
const ( PartOfLabel = "app.kubernetes.io/part-of" // = Application Application = "openshift-migration" )
Common labels
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) // Mirrors the UID on a migmigration to the labels // field for easy search. Distinct from migrated-by-migmigration // since this shouldn't be used for rollback. // The value is the migration.UID(). MigMigrationUIDLabel = "migration.openshift.io/migration-uid" // (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 associated Backup name MigBackupLabel = "migration.openshift.io/migrated-by-backup" // (backup name) // 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" // RsyncPodIdentityLabel identifies sibling Rsync attempts/pods RsyncPodIdentityLabel = "migration.openshift.io/created-for-pvc" // Identifies if the pod is application pod or not ApplicationPodLabel = "migration.openshift.io/is-application-pod" )
Labels.
const ( ExtendedPVAnalysisFailed = "ExtendedPVAnalysisFailed" ExtendedPVAnalysisStarted = "ExtendedPVAnalysisStarted" )
VolumeAdjuster condition types
const ( FailedRunningDf = "FailedRunningDf" FailedRunningDu = "FailedRunningDu" )
VolumeAdjuster reasons
const ( VolumeAdjustmentNoOp = "No change in PV capacity is needed." VolumeAdjustmentUsageExceeded = "PV usage is close to 100%. Additional capacity will be allocated to avoid issues migrating data to the target cluster." VolumeAdjustmentCapacityMismatch = "" /* 162-byte string literal not displayed */ )
Proposed volume size computation reasons
const ( ClusterConfigMapName = "migration-cluster-config" RegistryImageKey = "REGISTRY_IMAGE" StagePodImageKey = "STAGE_IMAGE" RsyncTransferImageKey = "RSYNC_TRANSFER_IMAGE" ClusterSubdomainKey = "CLUSTER_SUBDOMAIN" OperatorVersionKey = "OPERATOR_VERSION" RegistryReadinessProbeTimeout = "REGISTRY_READINESS_TIMEOUT" RegistryLivenessProbeTimeout = "REGISTRY_LIVENESS_TIMEOUT" RegistryValidationSubpath = "REGISTRY_VALIDATION_SUBPATH" )
migration-cluster-config configmap
const ( RegistryDefaultProbeTimeout = 300 RegistryDefaultHealthcheckSubpath = "/v2/_catalog?n=5" )
constants
const ( HookPhaseLabel = "phase" HookOwnerLabel = "owner" PreBackupHookPhase = "PreBackup" PostBackupHookPhase = "PostBackup" PreRestoreHookPhase = "PreRestore" PostRestoreHookPhase = "PostRestore" )
const ( StorageConversionPVCNamePrefix = "new" MigrationTypeIdentified = "MigrationTypeIdentified" )
const ( PvMoveAction = "move" PvCopyAction = "copy" PvSkipAction = "skip" )
PV Actions.
const ( PvBlockCopyMethod = "block" PvFilesystemCopyMethod = "filesystem" PvSnapshotCopyMethod = "snapshot" )
PV Copy Methods.
Cloud Providers.
const ( MigplanMigrationRunning = "migplan.migration.openshift.io/running" MigplanMigrationFailed = "migplan.migration.openshift.io/failed" )
const ( TouchAnnotation = "openshift.io/touch" VeleroNamespace = "openshift-migration" OpenshiftMigrationNamespace = "openshift-migration" )
const (
ClosedIndexField = "closed"
)
Cache Indexes.
const (
// DVMPDoneLabelKey used to track progress of dvmp operations
DVMPDoneLabelKey = "migration.openshift.io/dvmp-done"
)
const (
MigrationRegistryLabel = "migration.openshift.io/migration-registry"
)
Registry labels for controller-created migration registry resources
const (
PlanIndexField = "MigPlanRef"
)
Cache Indexes.
const RSYNC_ENDPOINT_TYPE = "RSYNC_ENDPOINT_TYPE"
const (
SaToken = "saToken"
)
SA secret keys.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "migration.openshift.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
var Settings = &settings.Settings
Functions ¶
func AreRestConfigsEqual ¶
AreRestConfigsEqual given a new rest config, checks whether cluster's config is equal to it
func CorrelationLabel ¶
Build label (key, value) used to correlate CRs. Format: <kind>: <uid>. The <uid> should be the ObjectMeta.UID
func GetAccessModesForVolumeMode ¶
func GetAccessModesForVolumeMode(volumeMode kapi.PersistentVolumeMode, volumeAccessModes []VolumeModeAccessMode) []kapi.PersistentVolumeAccessMode
func GetImageStream ¶
func GetImageStream(client k8sclient.Client, ref *kapi.ObjectReference) (*imagev1.ImageStream, error)
Get a referenced ImageStream. Returns `nil` when the reference cannot be resolved.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type BackupStorageConfig ¶
type BackupStorageConfig struct { CredsSecretRef *kapi.ObjectReference `json:"credsSecretRef,omitempty"` AwsBucketName string `json:"awsBucketName,omitempty"` AwsRegion string `json:"awsRegion,omitempty"` AwsS3ForcePathStyle bool `json:"awsS3ForcePathStyle,omitempty"` AwsS3URL string `json:"awsS3Url,omitempty"` AwsPublicURL string `json:"awsPublicUrl,omitempty"` AwsKmsKeyID string `json:"awsKmsKeyId,omitempty"` AwsSignatureVersion string `json:"awsSignatureVersion,omitempty"` S3CustomCABundle []byte `json:"s3CustomCABundle,omitempty"` AzureStorageAccount string `json:"azureStorageAccount,omitempty"` AzureStorageContainer string `json:"azureStorageContainer,omitempty"` AzureResourceGroup string `json:"azureResourceGroup,omitempty"` GcpBucket string `json:"gcpBucket,omitempty"` Insecure bool `json:"insecure,omitempty"` }
BackupStorageConfig defines config for creating and storing Backups
func (*BackupStorageConfig) DeepCopy ¶
func (in *BackupStorageConfig) DeepCopy() *BackupStorageConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStorageConfig.
func (*BackupStorageConfig) DeepCopyInto ¶
func (in *BackupStorageConfig) DeepCopyInto(out *BackupStorageConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupStorageConfig) GetCredSecret ¶
Get credentials secret.
func (*BackupStorageConfig) GetProvider ¶
func (r *BackupStorageConfig) GetProvider(name string) pvdr.Provider
Get the cloud provider.
type Condition ¶
type Condition struct { Type string `json:"type"` Status string `json:"status"` Reason string `json:"reason,omitempty"` Category string `json:"category"` Message string `json:"message,omitempty"` LastTransitionTime metav1.Time `json:"lastTransitionTime"` Durable bool `json:"durable,omitempty"` Items []string `json:"-"` // contains filtered or unexported fields }
Condition Type - The condition type. Status - The condition status. Reason - The reason for the condition. Message - The human readable description of the condition. Durable - The condition is not un-staged. Items - A list of `items` associated with the condition used to replace [] in `Message`. staging - A condition has been explicitly set/updated.
func (*Condition) BuildItems ¶
func (r *Condition) BuildItems()
Build the `Items` list by parsing the `Message`.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Condition) ExpandItems ¶
func (r *Condition) ExpandItems()
Replace [] in `Message` with the content of `Items`.
type Conditions ¶
type Conditions struct { List []Condition `json:"conditions,omitempty"` // contains filtered or unexported fields }
Managed collection of conditions. Intended to be included in resource Status. List - The list of conditions. staging - In `staging` mode, the search methods like
HasCondition() filter out un-staging conditions.
------------------- Example:
thing.Status.BeginStagingConditions() thing.Status.SetCondition(c) thing.Status.SetCondition(c) thing.Status.SetCondition(c) thing.Status.EndStagingConditions() thing.Status.SetReady(
!thing.Status.HasBlockerCondition(), "Resource Ready.")
func (*Conditions) BeginStagingConditions ¶
func (r *Conditions) BeginStagingConditions()
Begin staging conditions.
func (*Conditions) DeepCopy ¶
func (in *Conditions) DeepCopy() *Conditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
func (*Conditions) DeepCopyInto ¶
func (in *Conditions) DeepCopyInto(out *Conditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Conditions) DeleteCondition ¶
func (r *Conditions) DeleteCondition(types ...string)
Delete conditions by type.
func (*Conditions) EndStagingConditions ¶
func (r *Conditions) EndStagingConditions()
End staging conditions. Un-staged conditions are deleted.
func (*Conditions) FindCondition ¶
func (r *Conditions) FindCondition(cndType string) *Condition
Find a condition by type.
func (*Conditions) FindConditionByCategory ¶
func (r *Conditions) FindConditionByCategory(cndCategory string) []*Condition
func (*Conditions) HasAnyCondition ¶
func (r *Conditions) HasAnyCondition(types ...string) bool
The collection has Any of the specified conditions.
func (*Conditions) HasBlockerCondition ¶
func (r *Conditions) HasBlockerCondition() bool
The collection contains a `Ready` blocker condition.
func (*Conditions) HasCondition ¶
func (r *Conditions) HasCondition(types ...string) bool
The collection has ALL of the specified conditions.
func (*Conditions) HasConditionCategory ¶
func (r *Conditions) HasConditionCategory(names ...string) bool
The collection contains any conditions with category.
func (*Conditions) HasCriticalCondition ¶
func (r *Conditions) HasCriticalCondition(category ...string) bool
The collection contains a `Critical` error condition. Resource reconcile() should not continue.
func (*Conditions) HasErrorCondition ¶
func (r *Conditions) HasErrorCondition(category ...string) bool
The collection contains an `Error` condition.
func (*Conditions) HasWarnCondition ¶
func (r *Conditions) HasWarnCondition(category ...string) bool
The collection contains a `Warn` condition.
func (*Conditions) IsReady ¶
func (r *Conditions) IsReady() bool
The collection contains the `Ready` condition.
func (*Conditions) RecordEvents ¶
func (r *Conditions) RecordEvents(obj runtime.Object, recorder record.EventRecorder)
func (*Conditions) SetCondition ¶
func (r *Conditions) SetCondition(condition Condition)
Set (add/update) the specified condition to the collection.
func (*Conditions) SetReady ¶
func (r *Conditions) SetReady(ready bool, message string)
Set `Ready` condition.
func (*Conditions) SetReconcileFailed ¶
func (r *Conditions) SetReconcileFailed(err error)
Set the `ReconcileFailed` condition. Clear the `Ready` condition. Ends staging.
func (*Conditions) StageCondition ¶
func (r *Conditions) StageCondition(types ...string)
Stage an existing condition by type.
type DirectImageMigration ¶
type DirectImageMigration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DirectImageMigrationSpec `json:"spec,omitempty"` Status DirectImageMigrationStatus `json:"status,omitempty"` }
DirectImageMigration is the Schema for the directimagemigrations API +kubebuilder:resource:path=directimagemigrations,shortName=dim +k8s:openapi-gen=true
func (*DirectImageMigration) AddErrors ¶
func (r *DirectImageMigration) AddErrors(errors []string)
Add (de-duplicated) errors.
func (*DirectImageMigration) DeepCopy ¶
func (in *DirectImageMigration) DeepCopy() *DirectImageMigration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageMigration.
func (*DirectImageMigration) DeepCopyInto ¶
func (in *DirectImageMigration) DeepCopyInto(out *DirectImageMigration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectImageMigration) DeepCopyObject ¶
func (in *DirectImageMigration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DirectImageMigration) DirectImageStreamMigrationLabels ¶
func (r *DirectImageMigration) DirectImageStreamMigrationLabels(is imagev1.ImageStream) map[string]string
func (*DirectImageMigration) GetCorrelationLabel ¶
func (r *DirectImageMigration) GetCorrelationLabel() (string, string)
func (*DirectImageMigration) GetCorrelationLabels ¶
func (r *DirectImageMigration) GetCorrelationLabels() map[string]string
DirectImageMigration
func (*DirectImageMigration) GetDestinationCluster ¶
func (r *DirectImageMigration) GetDestinationCluster(client k8sclient.Client) (*MigCluster, error)
func (*DirectImageMigration) GetDestinationNamespaces ¶
func (r *DirectImageMigration) GetDestinationNamespaces() []string
GetDestinationNamespaces get destination namespaces without mapping
func (*DirectImageMigration) GetMigrationForDIM ¶
func (r *DirectImageMigration) GetMigrationForDIM(client k8sclient.Client) (*MigMigration, error)
Get the MigMigration that owns this DirectImageMigration. If not owned, return nil.
func (*DirectImageMigration) GetName ¶
func (r *DirectImageMigration) GetName() string
func (*DirectImageMigration) GetNamespace ¶
func (r *DirectImageMigration) GetNamespace() string
func (*DirectImageMigration) GetNamespaceMapping ¶
func (r *DirectImageMigration) GetNamespaceMapping() map[string]string
GetNamespaceMapping gets a map of src to dest namespaces
func (*DirectImageMigration) GetSourceCluster ¶
func (r *DirectImageMigration) GetSourceCluster(client k8sclient.Client) (*MigCluster, error)
func (*DirectImageMigration) GetSourceNamespaces ¶
func (r *DirectImageMigration) GetSourceNamespaces() []string
GetSourceNamespaces get source namespaces without mapping
func (*DirectImageMigration) HasCompleted ¶
func (r *DirectImageMigration) HasCompleted() (bool, []string, []string)
HasCompleted gets whether a DirectImageMigration has completed, a list of errors, if any, and progress results
func (*DirectImageMigration) HasErrors ¶
func (r *DirectImageMigration) HasErrors() bool
HasErrors will notify about error presence on the DirectImageMigration resource
func (*DirectImageMigration) HasReconciled ¶
func (r *DirectImageMigration) HasReconciled() bool
func (*DirectImageMigration) MarkReconciled ¶
func (r *DirectImageMigration) MarkReconciled()
type DirectImageMigrationList ¶
type DirectImageMigrationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DirectImageMigration `json:"items"` }
DirectImageMigrationList contains a list of DirectImageMigration
func (*DirectImageMigrationList) DeepCopy ¶
func (in *DirectImageMigrationList) DeepCopy() *DirectImageMigrationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageMigrationList.
func (*DirectImageMigrationList) DeepCopyInto ¶
func (in *DirectImageMigrationList) DeepCopyInto(out *DirectImageMigrationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectImageMigrationList) DeepCopyObject ¶
func (in *DirectImageMigrationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DirectImageMigrationSpec ¶
type DirectImageMigrationSpec struct { SrcMigClusterRef *kapi.ObjectReference `json:"srcMigClusterRef,omitempty"` DestMigClusterRef *kapi.ObjectReference `json:"destMigClusterRef,omitempty"` // Holds names of all namespaces to run DIM to get all the imagestreams in these namespaces. Namespaces []string `json:"namespaces,omitempty"` // LabelSelector optional label selector on the included resources to migrate // +kubebuilder:validation:Optional LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` }
DirectImageMigrationSpec defines the desired state of DirectImageMigration
func (*DirectImageMigrationSpec) DeepCopy ¶
func (in *DirectImageMigrationSpec) DeepCopy() *DirectImageMigrationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageMigrationSpec.
func (*DirectImageMigrationSpec) DeepCopyInto ¶
func (in *DirectImageMigrationSpec) DeepCopyInto(out *DirectImageMigrationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DirectImageMigrationStatus ¶
type DirectImageMigrationStatus struct { Conditions `json:","` ObservedDigest string `json:"observedDigest,omitempty"` StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` Phase string `json:"phase,omitempty"` Itinerary string `json:"itinerary,omitempty"` Errors []string `json:"errors,omitempty"` NewISs []*ImageStreamListItem `json:"newISs,omitempty"` SuccessfulISs []*ImageStreamListItem `json:"successfulISs,omitempty"` DeletedISs []*ImageStreamListItem `json:"deletedISs,omitempty"` FailedISs []*ImageStreamListItem `json:"failedISs,omitempty"` }
DirectImageMigrationStatus defines the observed state of DirectImageMigration
func (*DirectImageMigrationStatus) DeepCopy ¶
func (in *DirectImageMigrationStatus) DeepCopy() *DirectImageMigrationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageMigrationStatus.
func (*DirectImageMigrationStatus) DeepCopyInto ¶
func (in *DirectImageMigrationStatus) DeepCopyInto(out *DirectImageMigrationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DirectImageStreamMigration ¶
type DirectImageStreamMigration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DirectImageStreamMigrationSpec `json:"spec,omitempty"` Status DirectImageStreamMigrationStatus `json:"status,omitempty"` }
DirectImageStreamMigration is the Schema for the directimagestreammigrations API +kubebuilder:resource:path=directimagestreammigrations,shortName=dism +k8s:openapi-gen=true
func (*DirectImageStreamMigration) AddErrors ¶
func (r *DirectImageStreamMigration) AddErrors(errors []string)
Add (de-duplicated) errors.
func (*DirectImageStreamMigration) DeepCopy ¶
func (in *DirectImageStreamMigration) DeepCopy() *DirectImageStreamMigration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageStreamMigration.
func (*DirectImageStreamMigration) DeepCopyInto ¶
func (in *DirectImageStreamMigration) DeepCopyInto(out *DirectImageStreamMigration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectImageStreamMigration) DeepCopyObject ¶
func (in *DirectImageStreamMigration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DirectImageStreamMigration) GetCorrelationLabel ¶
func (r *DirectImageStreamMigration) GetCorrelationLabel() (string, string)
func (*DirectImageStreamMigration) GetCorrelationLabels ¶
func (r *DirectImageStreamMigration) GetCorrelationLabels() map[string]string
DirectImageStreamMigration
func (*DirectImageStreamMigration) GetDIMforDISM ¶
func (r *DirectImageStreamMigration) GetDIMforDISM(client k8sclient.Client) (*DirectImageMigration, error)
Get the DirectImageMigration that owns this DirectImageStreamMigration. If not owned, return nil.
func (*DirectImageStreamMigration) GetDestinationCluster ¶
func (r *DirectImageStreamMigration) GetDestinationCluster(client k8sclient.Client) (*MigCluster, error)
func (*DirectImageStreamMigration) GetDestinationNamespace ¶
func (r *DirectImageStreamMigration) GetDestinationNamespace() string
GetDestinationNamespaces get destination namespace
func (*DirectImageStreamMigration) GetImageStream ¶
func (r *DirectImageStreamMigration) GetImageStream(c k8sclient.Client) (*imagev1.ImageStream, error)
func (*DirectImageStreamMigration) GetMigrationForDISM ¶
func (r *DirectImageStreamMigration) GetMigrationForDISM(client k8sclient.Client) (*MigMigration, error)
Get the Migration associated with this DirectImageStreamMigration. If not owned, return nil.
func (*DirectImageStreamMigration) GetName ¶
func (r *DirectImageStreamMigration) GetName() string
func (*DirectImageStreamMigration) GetNamespace ¶
func (r *DirectImageStreamMigration) GetNamespace() string
func (*DirectImageStreamMigration) GetSourceCluster ¶
func (r *DirectImageStreamMigration) GetSourceCluster(client k8sclient.Client) (*MigCluster, error)
func (*DirectImageStreamMigration) HasCompleted ¶
func (r *DirectImageStreamMigration) HasCompleted() (bool, []string)
HasCompleted gets whether a DirectImageStreamMigration has completed and a list of errors, if any
func (*DirectImageStreamMigration) HasErrors ¶
func (r *DirectImageStreamMigration) HasErrors() bool
HasErrors will notify about error presence on the DirectImageStreamMigration resource
func (*DirectImageStreamMigration) HasReconciled ¶
func (r *DirectImageStreamMigration) HasReconciled() bool
func (*DirectImageStreamMigration) MarkReconciled ¶
func (r *DirectImageStreamMigration) MarkReconciled()
type DirectImageStreamMigrationList ¶
type DirectImageStreamMigrationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DirectImageStreamMigration `json:"items"` }
DirectImageStreamMigrationList contains a list of DirectImageStreamMigration
func (*DirectImageStreamMigrationList) DeepCopy ¶
func (in *DirectImageStreamMigrationList) DeepCopy() *DirectImageStreamMigrationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageStreamMigrationList.
func (*DirectImageStreamMigrationList) DeepCopyInto ¶
func (in *DirectImageStreamMigrationList) DeepCopyInto(out *DirectImageStreamMigrationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectImageStreamMigrationList) DeepCopyObject ¶
func (in *DirectImageStreamMigrationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DirectImageStreamMigrationSpec ¶
type DirectImageStreamMigrationSpec struct { SrcMigClusterRef *kapi.ObjectReference `json:"srcMigClusterRef,omitempty"` DestMigClusterRef *kapi.ObjectReference `json:"destMigClusterRef,omitempty"` ImageStreamRef *kapi.ObjectReference `json:"imageStreamRef,omitempty"` // Holds the name of the namespace on destination cluster where imagestreams should be migrated. DestNamespace string `json:"destNamespace,omitempty"` }
DirectImageStreamMigrationSpec defines the desired state of DirectImageStreamMigration
func (*DirectImageStreamMigrationSpec) DeepCopy ¶
func (in *DirectImageStreamMigrationSpec) DeepCopy() *DirectImageStreamMigrationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageStreamMigrationSpec.
func (*DirectImageStreamMigrationSpec) DeepCopyInto ¶
func (in *DirectImageStreamMigrationSpec) DeepCopyInto(out *DirectImageStreamMigrationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DirectImageStreamMigrationStatus ¶
type DirectImageStreamMigrationStatus struct { Conditions `json:","` ObservedDigest string `json:"observedDigest,omitempty"` StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` Phase string `json:"phase,omitempty"` Itinerary string `json:"itinerary,omitempty"` Errors []string `json:"errors,omitempty"` }
DirectImageStreamMigrationStatus defines the observed state of DirectImageStreamMigration
func (*DirectImageStreamMigrationStatus) DeepCopy ¶
func (in *DirectImageStreamMigrationStatus) DeepCopy() *DirectImageStreamMigrationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageStreamMigrationStatus.
func (*DirectImageStreamMigrationStatus) DeepCopyInto ¶
func (in *DirectImageStreamMigrationStatus) DeepCopyInto(out *DirectImageStreamMigrationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DirectVolumeMigration ¶
type DirectVolumeMigration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DirectVolumeMigrationSpec `json:"spec,omitempty"` Status DirectVolumeMigrationStatus `json:"status,omitempty"` }
DirectVolumeMigration is the Schema for the direct pv migration API +kubebuilder:resource:path=directvolumemigrations,shortName=dvm +k8s:openapi-gen=true
func (*DirectVolumeMigration) AddErrors ¶
func (r *DirectVolumeMigration) AddErrors(errors []string)
Add (de-duplicated) errors.
func (*DirectVolumeMigration) AllReportingCompleted ¶
func (dvm *DirectVolumeMigration) AllReportingCompleted() bool
func (*DirectVolumeMigration) DeepCopy ¶
func (in *DirectVolumeMigration) DeepCopy() *DirectVolumeMigration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigration.
func (*DirectVolumeMigration) DeepCopyInto ¶
func (in *DirectVolumeMigration) DeepCopyInto(out *DirectVolumeMigration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectVolumeMigration) DeepCopyObject ¶
func (in *DirectVolumeMigration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DirectVolumeMigration) GetCorrelationLabel ¶
func (r *DirectVolumeMigration) GetCorrelationLabel() (string, string)
func (*DirectVolumeMigration) GetCorrelationLabels ¶
func (r *DirectVolumeMigration) GetCorrelationLabels() map[string]string
Direct
func (*DirectVolumeMigration) GetDestinationCluster ¶
func (r *DirectVolumeMigration) GetDestinationCluster(client k8sclient.Client) (*MigCluster, error)
func (*DirectVolumeMigration) GetDestinationNamespaces ¶
func (r *DirectVolumeMigration) GetDestinationNamespaces() []string
func (*DirectVolumeMigration) GetMigrationForDVM ¶
func (r *DirectVolumeMigration) GetMigrationForDVM(client k8sclient.Client) (*MigMigration, error)
func (*DirectVolumeMigration) GetName ¶
func (r *DirectVolumeMigration) GetName() string
func (*DirectVolumeMigration) GetNamespace ¶
func (r *DirectVolumeMigration) GetNamespace() string
func (*DirectVolumeMigration) GetSourceCluster ¶
func (r *DirectVolumeMigration) GetSourceCluster(client k8sclient.Client) (*MigCluster, error)
func (*DirectVolumeMigration) GetSourceNamespaces ¶
func (r *DirectVolumeMigration) GetSourceNamespaces() []string
func (*DirectVolumeMigration) HasErrors ¶
func (r *DirectVolumeMigration) HasErrors() bool
HasErrors will notify about error presence on the DirectVolumeMigration resource
func (*DirectVolumeMigration) HasReconciled ¶
func (r *DirectVolumeMigration) HasReconciled() bool
func (*DirectVolumeMigration) IsCompleted ¶
func (dvm *DirectVolumeMigration) IsCompleted() bool
func (*DirectVolumeMigration) IsCutover ¶
func (dvm *DirectVolumeMigration) IsCutover() bool
func (*DirectVolumeMigration) IsLiveMigrate ¶
func (dvm *DirectVolumeMigration) IsLiveMigrate() bool
func (*DirectVolumeMigration) IsRollback ¶
func (dvm *DirectVolumeMigration) IsRollback() bool
func (*DirectVolumeMigration) IsStage ¶
func (dvm *DirectVolumeMigration) IsStage() bool
func (*DirectVolumeMigration) MarkReconciled ¶
func (r *DirectVolumeMigration) MarkReconciled()
func (*DirectVolumeMigration) SkipVolume ¶
func (dvm *DirectVolumeMigration) SkipVolume(volumeName, namespace string)
type DirectVolumeMigrationList ¶
type DirectVolumeMigrationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DirectVolumeMigration `json:"items"` }
DirectVolumeMigrationList contains a list of DirectVolumeMigration
func (*DirectVolumeMigrationList) DeepCopy ¶
func (in *DirectVolumeMigrationList) DeepCopy() *DirectVolumeMigrationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationList.
func (*DirectVolumeMigrationList) DeepCopyInto ¶
func (in *DirectVolumeMigrationList) DeepCopyInto(out *DirectVolumeMigrationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectVolumeMigrationList) DeepCopyObject ¶
func (in *DirectVolumeMigrationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DirectVolumeMigrationProgress ¶
type DirectVolumeMigrationProgress struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DirectVolumeMigrationProgressSpec `json:"spec,omitempty"` Status DirectVolumeMigrationProgressStatus `json:"status,omitempty"` }
DirectVolumeMigrationProgress is the Schema for the directvolumemigrationprogresses API +kubebuilder:resource:path=directvolumemigrationprogresses,shortName=dvmp +kubebuilder:printcolumn:name="Cluster",type=string,JSONPath=".spec.clusterRef.name" +kubebuilder:printcolumn:name="Pod Name",type=string,JSONPath=".status.podName" +kubebuilder:printcolumn:name="Pod Namespace",type=string,JSONPath=".spec.podNamespace" +kubebuilder:printcolumn:name="Progress Percent",type=string,JSONPath=".status.totalProgressPercentage" +kubebuilder:printcolumn:name="Transfer Rate",type=string,JSONPath=".status.lastObservedTransferRate" +kubebuilder:printcolumn:name="Age",type=date,JSONPath=".metadata.creationTimestamp" +k8s:openapi-gen=true
func (*DirectVolumeMigrationProgress) DeepCopy ¶
func (in *DirectVolumeMigrationProgress) DeepCopy() *DirectVolumeMigrationProgress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationProgress.
func (*DirectVolumeMigrationProgress) DeepCopyInto ¶
func (in *DirectVolumeMigrationProgress) DeepCopyInto(out *DirectVolumeMigrationProgress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectVolumeMigrationProgress) DeepCopyObject ¶
func (in *DirectVolumeMigrationProgress) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DirectVolumeMigrationProgress) GetDVMforDVMP ¶
func (r *DirectVolumeMigrationProgress) GetDVMforDVMP(client k8sclient.Client) (*DirectVolumeMigration, error)
Get the DirectVolumeMigration that owns this DirectVolumeMigrationProgress. If not owned, return nil.
func (*DirectVolumeMigrationProgress) GetMigrationforDVMP ¶
func (r *DirectVolumeMigrationProgress) GetMigrationforDVMP(client k8sclient.Client) (*MigMigration, error)
Get the MigMigration that owns this DirectVolumeMigrationProgress. If not owned, return nil.
func (*DirectVolumeMigrationProgress) MarkReconciled ¶
func (d *DirectVolumeMigrationProgress) MarkReconciled()
type DirectVolumeMigrationProgressList ¶
type DirectVolumeMigrationProgressList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DirectVolumeMigrationProgress `json:"items"` }
DirectVolumeMigrationProgressList contains a list of DirectVolumeMigrationProgress
func (*DirectVolumeMigrationProgressList) DeepCopy ¶
func (in *DirectVolumeMigrationProgressList) DeepCopy() *DirectVolumeMigrationProgressList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationProgressList.
func (*DirectVolumeMigrationProgressList) DeepCopyInto ¶
func (in *DirectVolumeMigrationProgressList) DeepCopyInto(out *DirectVolumeMigrationProgressList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectVolumeMigrationProgressList) DeepCopyObject ¶
func (in *DirectVolumeMigrationProgressList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DirectVolumeMigrationProgressSpec ¶
type DirectVolumeMigrationProgressSpec struct { ClusterRef *kapi.ObjectReference `json:"clusterRef,omitempty"` PodRef *kapi.ObjectReference `json:"podRef,omitempty"` PodNamespace string `json:"podNamespace,omitempty"` PodSelector map[string]string `json:"podSelector,omitempty"` }
DirectVolumeMigrationProgressSpec defines the desired state of DirectVolumeMigrationProgress
func (*DirectVolumeMigrationProgressSpec) DeepCopy ¶
func (in *DirectVolumeMigrationProgressSpec) DeepCopy() *DirectVolumeMigrationProgressSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationProgressSpec.
func (*DirectVolumeMigrationProgressSpec) DeepCopyInto ¶
func (in *DirectVolumeMigrationProgressSpec) DeepCopyInto(out *DirectVolumeMigrationProgressSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DirectVolumeMigrationProgressStatus ¶
type DirectVolumeMigrationProgressStatus struct { Conditions `json:",omitempty"` // RsyncPodStatus observed state of most recent Rsync attempt RsyncPodStatus `json:",inline"` // RsyncPodStatuses history of all Rsync attempts RsyncPodStatuses []RsyncPodStatus `json:"rsyncPodStatuses,omitempty"` // RsyncElapsedTime total elapsed time of Rsync operation RsyncElapsedTime *metav1.Duration `json:"rsyncElapsedTime,omitempty"` // TotalProgressPercentage cumulative percentage of all Rsync attempts TotalProgressPercentage string `json:"totalProgressPercentage,omitempty"` ObservedDigest string `json:"observedDigest,omitempty"` }
DirectVolumeMigrationProgressStatus defines the observed state of DirectVolumeMigrationProgress
func (*DirectVolumeMigrationProgressStatus) DeepCopy ¶
func (in *DirectVolumeMigrationProgressStatus) DeepCopy() *DirectVolumeMigrationProgressStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationProgressStatus.
func (*DirectVolumeMigrationProgressStatus) DeepCopyInto ¶
func (in *DirectVolumeMigrationProgressStatus) DeepCopyInto(out *DirectVolumeMigrationProgressStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectVolumeMigrationProgressStatus) RsyncPodExistsInHistory ¶
func (ds *DirectVolumeMigrationProgressStatus) RsyncPodExistsInHistory(podName string) bool
RsyncPodExistsInHistory checks whether Rsync pod status is already part of the history
type DirectVolumeMigrationSpec ¶
type DirectVolumeMigrationSpec struct { SrcMigClusterRef *kapi.ObjectReference `json:"srcMigClusterRef,omitempty"` DestMigClusterRef *kapi.ObjectReference `json:"destMigClusterRef,omitempty"` // BackOffLimit retry limit on Rsync pods BackOffLimit int `json:"backOffLimit,omitempty"` // Holds all the PVCs that are to be migrated with direct volume migration PersistentVolumeClaims []PVCToMigrate `json:"persistentVolumeClaims,omitempty"` // Set true to create namespaces in destination cluster CreateDestinationNamespaces bool `json:"createDestinationNamespaces,omitempty"` // Specifies if progress reporting CRs needs to be deleted or not DeleteProgressReportingCRs bool `json:"deleteProgressReportingCRs,omitempty"` // Specifies if any volumes associated with a VM should be live storage migrated instead of offline migrated LiveMigrate *bool `json:"liveMigrate,omitempty"` // Specifies if this is the final DVM in the migration plan MigrationType *DirectVolumeMigrationType `json:"migrationType,omitempty"` }
DirectVolumeMigrationSpec defines the desired state of DirectVolumeMigration
func (*DirectVolumeMigrationSpec) DeepCopy ¶
func (in *DirectVolumeMigrationSpec) DeepCopy() *DirectVolumeMigrationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationSpec.
func (*DirectVolumeMigrationSpec) DeepCopyInto ¶
func (in *DirectVolumeMigrationSpec) DeepCopyInto(out *DirectVolumeMigrationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DirectVolumeMigrationStatus ¶
type DirectVolumeMigrationStatus struct { Conditions `json:","` ObservedDigest string `json:"observedDigest"` StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` PhaseDescription string `json:"phaseDescription"` Phase string `json:"phase,omitempty"` Itinerary string `json:"itinerary,omitempty"` Errors []string `json:"errors,omitempty"` SuccessfulPods []*PodProgress `json:"successfulPods,omitempty"` FailedPods []*PodProgress `json:"failedPods,omitempty"` RunningPods []*PodProgress `json:"runningPods,omitempty"` PendingPods []*PodProgress `json:"pendingPods,omitempty"` UnknownPods []*PodProgress `json:"unknownPods,omitempty"` PendingSinceTimeLimitPods []*PodProgress `json:"pendingSinceTimeLimitPods,omitempty"` SuccessfulLiveMigrations []*LiveMigrationProgress `json:"successfulLiveMigration,omitempty"` RunningLiveMigrations []*LiveMigrationProgress `json:"runningLiveMigration,omitempty"` PendingLiveMigrations []*LiveMigrationProgress `json:"pendingLiveMigration,omitempty"` FailedLiveMigrations []*LiveMigrationProgress `json:"failedLiveMigration,omitempty"` RsyncOperations []*RsyncOperation `json:"rsyncOperations,omitempty"` SkippedVolumes []string `json:"skippedVolumes,omitempty"` }
DirectVolumeMigrationStatus defines the observed state of DirectVolumeMigration
func (*DirectVolumeMigrationStatus) AddRsyncOperation ¶
func (ds *DirectVolumeMigrationStatus) AddRsyncOperation(podStatus *RsyncOperation)
AddRsyncOperation adds a new RsyncOperation to list, updates an existing one if found
func (*DirectVolumeMigrationStatus) DeepCopy ¶
func (in *DirectVolumeMigrationStatus) DeepCopy() *DirectVolumeMigrationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationStatus.
func (*DirectVolumeMigrationStatus) DeepCopyInto ¶
func (in *DirectVolumeMigrationStatus) DeepCopyInto(out *DirectVolumeMigrationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DirectVolumeMigrationStatus) GetRsyncOperationStatusForPVC ¶
func (ds *DirectVolumeMigrationStatus) GetRsyncOperationStatusForPVC(pvcRef *kapi.ObjectReference) *RsyncOperation
GetRsyncOperationStatusForPVC returns RsyncOperation from status for matching PVC, creates new one if doesn't exist already
type DirectVolumeMigrationType ¶
type DirectVolumeMigrationType string
const ( MigrationTypeStage DirectVolumeMigrationType = "Stage" MigrationTypeFinal DirectVolumeMigrationType = "CutOver" MigrationTypeRollback DirectVolumeMigrationType = "Rollback" )
type EndpointType ¶
type EndpointType string
const ( Route EndpointType = "Route" ClusterIP EndpointType = "ClusterIP" NodePort EndpointType = "NodePort" )
type ImageStreamListItem ¶
type ImageStreamListItem struct { *kapi.ObjectReference `json:",inline"` DestNamespace string `json:"destNamespace,omitempty"` NotFound bool `json:"notFound,omitempty"` DirectMigration *kapi.ObjectReference `json:"directMigration,omitempty"` Errors []string `json:"errors,omitempty"` }
func (*ImageStreamListItem) DeepCopy ¶
func (in *ImageStreamListItem) DeepCopy() *ImageStreamListItem
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamListItem.
func (*ImageStreamListItem) DeepCopyInto ¶
func (in *ImageStreamListItem) DeepCopyInto(out *ImageStreamListItem)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Incompatible ¶
type Incompatible struct {
Namespaces []IncompatibleNamespace `json:"incompatibleNamespaces,omitempty"`
}
Incompatible - list of namespaces containing incompatible resources for migration which are being selected in the MigPlan
func (*Incompatible) DeepCopy ¶
func (in *Incompatible) DeepCopy() *Incompatible
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Incompatible.
func (*Incompatible) DeepCopyInto ¶
func (in *Incompatible) DeepCopyInto(out *Incompatible)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Incompatible) ResourceList ¶
func (i *Incompatible) ResourceList() (incompatible []string)
ResourceList returns a list of collected resources, which are not supported by an apiServer on a destination cluster
type IncompatibleGVK ¶
type IncompatibleGVK struct { Group string `json:"group"` Version string `json:"version"` Kind string `json:"kind"` }
IncompatibleGVK - custom structure for printing GVKs lowercase
func FromGVR ¶
func FromGVR(gvr schema.GroupVersionResource) IncompatibleGVK
FromGVR - allows to convert the scheme.GVR into lowercase IncompatibleGVK
func (*IncompatibleGVK) DeepCopy ¶
func (in *IncompatibleGVK) DeepCopy() *IncompatibleGVK
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IncompatibleGVK.
func (*IncompatibleGVK) DeepCopyInto ¶
func (in *IncompatibleGVK) DeepCopyInto(out *IncompatibleGVK)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IncompatibleNamespace ¶
type IncompatibleNamespace struct { Name string `json:"name"` GVKs []IncompatibleGVK `json:"gvks"` }
IncompatibleNamespace - namespace, which is noticed to contain resources incompatible by the migration
func (*IncompatibleNamespace) DeepCopy ¶
func (in *IncompatibleNamespace) DeepCopy() *IncompatibleNamespace
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IncompatibleNamespace.
func (*IncompatibleNamespace) DeepCopyInto ¶
func (in *IncompatibleNamespace) DeepCopyInto(out *IncompatibleNamespace)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LiveMigrationProgress ¶
type LiveMigrationProgress struct { VMName string `json:"vmName,omitempty"` VMNamespace string `json:"vmNamespace,omitempty"` PVCReference *kapi.ObjectReference `json:"pvcRef,omitempty"` LastObservedProgressPercent string `json:"lastObservedProgressPercent,omitempty"` LastObservedTransferRate string `json:"lastObservedTransferRate,omitempty"` TotalElapsedTime *metav1.Duration `json:"totalElapsedTime,omitempty"` Message string `json:"message,omitempty"` }
func (*LiveMigrationProgress) DeepCopy ¶
func (in *LiveMigrationProgress) DeepCopy() *LiveMigrationProgress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiveMigrationProgress.
func (*LiveMigrationProgress) DeepCopyInto ¶
func (in *LiveMigrationProgress) DeepCopyInto(out *LiveMigrationProgress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigAnalytic ¶
type MigAnalytic struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MigAnalyticSpec `json:"spec,omitempty"` Status MigAnalyticStatus `json:"status,omitempty"` }
MigAnalytic is the Schema for the miganalytics API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="Plan",type=string,JSONPath=".spec.migPlanRef.name" +kubebuilder:printcolumn:name="Progress",type=string,JSONPath=".status.analytics.percentComplete" +kubebuilder:printcolumn:name="Resources",type=string,JSONPath=".status.analytics.k8sResourceTotal" +kubebuilder:printcolumn:name="Images",type=string,JSONPath=".status.analytics.imageCount" +kubebuilder:printcolumn:name="ImageSize",type=string,JSONPath=".status.analytics.imageSizeTotal" +kubebuilder:printcolumn:name="PVs",type=string,JSONPath=".status.analytics.pvCount" +kubebuilder:printcolumn:name="PVCapacity",type=string,JSONPath=".status.analytics.pvCapacity" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*MigAnalytic) DeepCopy ¶
func (in *MigAnalytic) DeepCopy() *MigAnalytic
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalytic.
func (*MigAnalytic) DeepCopyInto ¶
func (in *MigAnalytic) DeepCopyInto(out *MigAnalytic)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigAnalytic) DeepCopyObject ¶
func (in *MigAnalytic) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MigAnalytic) GetCorrelationLabel ¶
func (r *MigAnalytic) GetCorrelationLabel() (string, string)
func (*MigAnalytic) GetCorrelationLabels ¶
func (r *MigAnalytic) GetCorrelationLabels() map[string]string
Analytic
func (*MigAnalytic) GetName ¶
func (r *MigAnalytic) GetName() string
func (*MigAnalytic) GetNamespace ¶
func (r *MigAnalytic) GetNamespace() string
func (*MigAnalytic) HasReconciled ¶
func (r *MigAnalytic) HasReconciled() bool
func (*MigAnalytic) MarkReconciled ¶
func (r *MigAnalytic) MarkReconciled()
type MigAnalyticList ¶
type MigAnalyticList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MigAnalytic `json:"items"` }
MigAnalyticList contains a list of MigAnalytic
func (*MigAnalyticList) DeepCopy ¶
func (in *MigAnalyticList) DeepCopy() *MigAnalyticList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalyticList.
func (*MigAnalyticList) DeepCopyInto ¶
func (in *MigAnalyticList) DeepCopyInto(out *MigAnalyticList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigAnalyticList) DeepCopyObject ¶
func (in *MigAnalyticList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MigAnalyticNSImage ¶
type MigAnalyticNSImage struct { Name string `json:"name"` Reference string `json:"reference"` Size resource.Quantity `json:"size"` }
func (*MigAnalyticNSImage) DeepCopy ¶
func (in *MigAnalyticNSImage) DeepCopy() *MigAnalyticNSImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalyticNSImage.
func (*MigAnalyticNSImage) DeepCopyInto ¶
func (in *MigAnalyticNSImage) DeepCopyInto(out *MigAnalyticNSImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigAnalyticNSResource ¶
type MigAnalyticNSResource struct { Group string `json:"group"` Version string `json:"version"` Kind string `json:"kind"` Count int `json:"count"` }
MigAnalyticNamespaceResource defines the observed state of MigAnalyticNamespaceResource
func (*MigAnalyticNSResource) DeepCopy ¶
func (in *MigAnalyticNSResource) DeepCopy() *MigAnalyticNSResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalyticNSResource.
func (*MigAnalyticNSResource) DeepCopyInto ¶
func (in *MigAnalyticNSResource) DeepCopyInto(out *MigAnalyticNSResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigAnalyticNamespace ¶
type MigAnalyticNamespace struct { Namespace string `json:"namespace"` K8SResourceTotal int `json:"k8sResourceTotal"` ExcludedK8SResourceTotal int `json:"excludedK8SResourceTotal"` IncompatibleK8SResourceTotal int `json:"incompatibleK8SResourceTotal"` PVCapacity resource.Quantity `json:"pvCapacity"` PVCount int `json:"pvCount"` ImageCount int `json:"imageCount"` ImageSizeTotal resource.Quantity `json:"imageSizeTotal"` Images []MigAnalyticNSImage `json:"images,omitempty"` K8SResources []MigAnalyticNSResource `json:"k8sResources,omitempty"` PersistentVolumes []MigAnalyticPersistentVolumeClaim `json:"persistentVolumes,omitempty"` ExcludedK8SResources []MigAnalyticNSResource `json:"excludedK8SResources,omitempty"` IncompatibleK8SResources []MigAnalyticNSResource `json:"incompatibleK8SResources,omitempty"` }
MigAnalyticNamespace defines the observed state of MigAnalyticNamespace
func (*MigAnalyticNamespace) DeepCopy ¶
func (in *MigAnalyticNamespace) DeepCopy() *MigAnalyticNamespace
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalyticNamespace.
func (*MigAnalyticNamespace) DeepCopyInto ¶
func (in *MigAnalyticNamespace) DeepCopyInto(out *MigAnalyticNamespace)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigAnalyticPersistentVolumeClaim ¶
type MigAnalyticPersistentVolumeClaim struct { // Name of the persistent volume claim Name string `json:"name"` // Requested capacity of the claim RequestedCapacity resource.Quantity `json:"requestedCapacity,omitempty"` // Actual provisioned capacity of the volume ActualCapacity resource.Quantity `json:"actualCapacity,omitempty"` // Usage of volume in percentage UsagePercentage int `json:"usagePercentage,omitempty"` // Adjusted capacity of the volume ProposedCapacity resource.Quantity `json:"proposedCapacity,omitempty"` // Human readable reason for proposed adjustment Comment string `json:"comment,omitempty"` // Indicate whether or not sparse files were found in the volume SparseFilesFound bool `json:"sparseFilesFound,omitempty"` }
MigAnalyticPersistentVolumeClaim represents a Kubernetes Persistent volume claim with discovered analytic properties
func (*MigAnalyticPersistentVolumeClaim) DeepCopy ¶
func (in *MigAnalyticPersistentVolumeClaim) DeepCopy() *MigAnalyticPersistentVolumeClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalyticPersistentVolumeClaim.
func (*MigAnalyticPersistentVolumeClaim) DeepCopyInto ¶
func (in *MigAnalyticPersistentVolumeClaim) DeepCopyInto(out *MigAnalyticPersistentVolumeClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigAnalyticPlan ¶
type MigAnalyticPlan struct { Plan string `json:"plan"` PercentComplete int `json:"percentComplete"` K8SResourceTotal int `json:"k8sResourceTotal"` ExcludedK8SResourceTotal int `json:"excludedk8sResourceTotal"` IncompatibleK8SResourceTotal int `json:"incompatiblek8sResourceTotal"` PVCapacity resource.Quantity `json:"pvCapacity"` PVCount int `json:"pvCount"` ImageCount int `json:"imageCount"` ImageSizeTotal resource.Quantity `json:"imageSizeTotal"` Namespaces []MigAnalyticNamespace `json:"namespaces,omitempty"` }
MigAnalyticPlan defines the observed state of MigAnalyticPlan
func (*MigAnalyticPlan) DeepCopy ¶
func (in *MigAnalyticPlan) DeepCopy() *MigAnalyticPlan
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalyticPlan.
func (*MigAnalyticPlan) DeepCopyInto ¶
func (in *MigAnalyticPlan) DeepCopyInto(out *MigAnalyticPlan)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigAnalyticSpec ¶
type MigAnalyticSpec struct { MigPlanRef *kapi.ObjectReference `json:"migPlanRef"` // Enables analysis of persistent volume capacity, if set true. This is a required field. AnalyzePVCapacity bool `json:"analyzePVCapacity"` // Enables analysis of image count, if set true. This is a required field. AnalyzeImageCount bool `json:"analyzeImageCount"` // Enables analysis of k8s resources, if set true. This is a required field. AnalyzeK8SResources bool `json:"analyzeK8SResources"` // Enable used in analysis of image count, if set true. ListImages bool `json:"listImages,omitempty"` // Represents limit on image counts ListImagesLimit int `json:"listImagesLimit,omitempty"` // Enables advanced analysis of volumes required for PV resizing AnalyzeExtendedPVCapacity bool `json:"analyzeExtendedPVCapacity,omitempty"` // Enables refreshing existing MigAnalytic Refresh bool `json:"refresh,omitempty"` }
MigAnalyticSpec defines the desired state of MigAnalytic
func (*MigAnalyticSpec) DeepCopy ¶
func (in *MigAnalyticSpec) DeepCopy() *MigAnalyticSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalyticSpec.
func (*MigAnalyticSpec) DeepCopyInto ¶
func (in *MigAnalyticSpec) DeepCopyInto(out *MigAnalyticSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigAnalyticStatus ¶
type MigAnalyticStatus struct { Conditions `json:","` ObservedGeneration int64 `json:"observedGeneration,omitempty"` Analytics MigAnalyticPlan `json:"analytics,omitempty"` }
MigAnalyticStatus defines the observed state of MigAnalytic
func (*MigAnalyticStatus) DeepCopy ¶
func (in *MigAnalyticStatus) DeepCopy() *MigAnalyticStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalyticStatus.
func (*MigAnalyticStatus) DeepCopyInto ¶
func (in *MigAnalyticStatus) DeepCopyInto(out *MigAnalyticStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigCluster ¶
type MigCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MigClusterSpec `json:"spec,omitempty"` Status MigClusterStatus `json:"status,omitempty"` }
MigCluster is the Schema for the migclusters API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="URL",type=string,JSONPath=".spec.url" +kubebuilder:printcolumn:name="Host",type=boolean,JSONPath=".spec.isHostCluster" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func GetCluster ¶
func GetCluster(client k8sclient.Client, ref *kapi.ObjectReference) (*MigCluster, error)
Get a referenced MigCluster. Returns `nil` when the reference cannot be resolved.
func ListClusters ¶
func ListClusters(client k8sclient.Client) ([]MigCluster, error)
List MigCluster Returns and empty list when none found.
func (*MigCluster) BuildRestConfig ¶
Build a REST configuration.
func (*MigCluster) DeepCopy ¶
func (in *MigCluster) DeepCopy() *MigCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigCluster.
func (*MigCluster) DeepCopyInto ¶
func (in *MigCluster) DeepCopyInto(out *MigCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigCluster) DeepCopyObject ¶
func (in *MigCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MigCluster) DeleteResources ¶
Delete resources on the cluster by label.
func (*MigCluster) GetClient ¶
GetClient gets a host or remote compat.Client for interacting with a MigCluster. For best performance, returns the first available from this list: 1) compat.Client with cache from map 2) compat.Client with cache by building from manager k8s client 3) compat.Client without cache from map 4) compat.Client without cache by building from restConfig
func (*MigCluster) GetClusterConfigMap ¶
func (*MigCluster) GetClusterSubdomain ¶
func (m *MigCluster) GetClusterSubdomain(c k8sclient.Client) (string, error)
GetClusterSubdomain gets a MigCluster specific subdomain value to be used for DVM routes
func (*MigCluster) GetCorrelationLabel ¶
func (r *MigCluster) GetCorrelationLabel() (string, string)
func (*MigCluster) GetCorrelationLabels ¶
func (r *MigCluster) GetCorrelationLabels() map[string]string
Cluster
func (*MigCluster) GetInternalRegistryPath ¶
func (m *MigCluster) GetInternalRegistryPath(c k8sclient.Client) (string, error)
func (*MigCluster) GetKubeStorageClasses ¶
func (r *MigCluster) GetKubeStorageClasses(client k8sclient.Client) ([]storageapi.StorageClass, error)
Get the list of k8s StorageClasses from the cluster.
func (*MigCluster) GetName ¶
func (r *MigCluster) GetName() string
func (*MigCluster) GetNamespace ¶
func (r *MigCluster) GetNamespace() string
func (*MigCluster) GetObjectReference ¶
func (r *MigCluster) GetObjectReference() *kapi.ObjectReference
Get object reference for migcluster
func (*MigCluster) GetOperatorVersion ¶
func (m *MigCluster) GetOperatorVersion(c k8sclient.Client) (string, error)
GetOperatorVersion retrieves the operator version from the respective controllers ConfigMap
func (*MigCluster) GetRegistryImage ¶
func (m *MigCluster) GetRegistryImage(c k8sclient.Client) (string, error)
GetRegistryImage gets a MigCluster specific registry image from ConfigMap
func (*MigCluster) GetRegistryLivenessTimeout ¶
func (m *MigCluster) GetRegistryLivenessTimeout(c k8sclient.Client) (int32, error)
GetRegistryLivenessTimeout returns liveness timeout value for migration registry
func (*MigCluster) GetRegistryPath ¶
func (m *MigCluster) GetRegistryPath(c k8sclient.Client) (string, error)
func (*MigCluster) GetRegistryReadinessTimeout ¶
func (m *MigCluster) GetRegistryReadinessTimeout(c k8sclient.Client) (int32, error)
GetRegistryReadinessTimeout returns readiness timeout value for migration registry
func (*MigCluster) GetRsyncTransferImage ¶
func (m *MigCluster) GetRsyncTransferImage(c k8sclient.Client) (string, error)
GetRsyncTransferImage gets a MigCluster specific rsync transfer image from ConfigMap
func (*MigCluster) GetServiceAccountSecret ¶
Get the service account secret. Returns `nil` when the reference cannot be resolved.
func (*MigCluster) GetStorageClasses ¶
func (r *MigCluster) GetStorageClasses(client k8sclient.Client) ([]StorageClass, error)
Get the list StorageClasses in the format expected by PV discovery
func (*MigCluster) HasReconciled ¶
func (r *MigCluster) HasReconciled() bool
func (*MigCluster) MarkReconciled ¶
func (r *MigCluster) MarkReconciled()
func (*MigCluster) OperatorVersionMatchesConfigmap ¶
func (m *MigCluster) OperatorVersionMatchesConfigmap(c k8sclient.Client) (bool, error)
Test whether OPERATOR_VERSION in configmap on MigCluster matches status.OperatorVersion
func (*MigCluster) SetOperatorVersion ¶
func (m *MigCluster) SetOperatorVersion(c k8sclient.Client) error
Pulls the operatorVersion from the migration-cluster-config configmap and loads it into MigCluster.Status.OperatorVersion
func (*MigCluster) SetRegistryPath ¶
func (m *MigCluster) SetRegistryPath(c k8sclient.Client) error
func (*MigCluster) TestConnection ¶
Test the connection settings by building a client.
func (*MigCluster) UpdateProvider ¶
func (r *MigCluster) UpdateProvider(provider pvdr.Provider)
type MigClusterList ¶
type MigClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MigCluster `json:"items"` }
MigClusterList contains a list of MigCluster
func (*MigClusterList) DeepCopy ¶
func (in *MigClusterList) DeepCopy() *MigClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigClusterList.
func (*MigClusterList) DeepCopyInto ¶
func (in *MigClusterList) DeepCopyInto(out *MigClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigClusterList) DeepCopyObject ¶
func (in *MigClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MigClusterSpec ¶
type MigClusterSpec struct { // Specifies if the cluster is host (where the controller is installed) or not. This is a required field. IsHostCluster bool `json:"isHostCluster"` // Stores the url of the remote cluster. The field is only required for the source cluster object. URL string `json:"url,omitempty"` ServiceAccountSecretRef *kapi.ObjectReference `json:"serviceAccountSecretRef,omitempty"` // If the migcluster needs SSL verification for connections a user can supply a custom CA bundle. This field is required only when spec.Insecure is set false CABundle []byte `json:"caBundle,omitempty"` // For azure clusters -- it's the resource group that in-cluster volumes use. AzureResourceGroup string `json:"azureResourceGroup,omitempty"` // If set false, user will need to provide CA bundle for TLS connection to the remote cluster. Insecure bool `json:"insecure,omitempty"` // An override setting to tell the controller that the source cluster restic needs to be restarted after stage pod creation. RestartRestic *bool `json:"restartRestic,omitempty"` // If set True, forces the controller to run a full suite of validations on migcluster. Refresh bool `json:"refresh,omitempty"` // Stores the path of registry route when using direct migration. ExposedRegistryPath string `json:"exposedRegistryPath,omitempty"` }
MigClusterSpec defines the desired state of MigCluster
func (*MigClusterSpec) DeepCopy ¶
func (in *MigClusterSpec) DeepCopy() *MigClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigClusterSpec.
func (*MigClusterSpec) DeepCopyInto ¶
func (in *MigClusterSpec) DeepCopyInto(out *MigClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigClusterStatus ¶
type MigClusterStatus struct { Conditions `json:","` ObservedDigest string `json:"observedDigest,omitempty"` RegistryPath string `json:"registryPath,omitempty"` OperatorVersion string `json:"operatorVersion,omitempty"` }
MigClusterStatus defines the observed state of MigCluster
func (*MigClusterStatus) DeepCopy ¶
func (in *MigClusterStatus) DeepCopy() *MigClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigClusterStatus.
func (*MigClusterStatus) DeepCopyInto ¶
func (in *MigClusterStatus) DeepCopyInto(out *MigClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigHook ¶
type MigHook struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MigHookSpec `json:"spec,omitempty"` Status MigHookStatus `json:"status,omitempty"` }
MigHook is the Schema for the mighooks API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="Image",type=string,JSONPath=".spec.image" +kubebuilder:printcolumn:name="TargetCluster",type=string,JSONPath=".spec.targetCluster" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*MigHook) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigHook.
func (*MigHook) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigHook) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MigHook) GetCorrelationLabel ¶
func (*MigHook) GetCorrelationLabels ¶
Hook
func (*MigHook) GetNamespace ¶
func (*MigHook) GetPhaseConfigMap ¶
func (r *MigHook) GetPhaseConfigMap(client k8sclient.Client, phase string, owner string) (*corev1.ConfigMap, error)
Get an existing configMap job.
func (*MigHook) GetPhaseJob ¶
func (r *MigHook) GetPhaseJob(client k8sclient.Client, phase string, owner string) (*batchv1.Job, error)
Get an existing hook job.
func (*MigHook) HasReconciled ¶
func (*MigHook) MarkReconciled ¶
func (r *MigHook) MarkReconciled()
type MigHookList ¶
type MigHookList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MigHook `json:"items"` }
MigHookList contains a list of MigHook
func (*MigHookList) DeepCopy ¶
func (in *MigHookList) DeepCopy() *MigHookList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigHookList.
func (*MigHookList) DeepCopyInto ¶
func (in *MigHookList) DeepCopyInto(out *MigHookList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigHookList) DeepCopyObject ¶
func (in *MigHookList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MigHookSpec ¶
type MigHookSpec struct { // Specifies whether the hook is a custom Ansible playbook or a pre-built image. This is a required field. Custom bool `json:"custom"` // Specifies the image of the hook to be executed. This is a required field. Image string `json:"image"` // Specifies the contents of the custom Ansible playbook in base64 format, it is used in conjunction with the custom boolean flag. Playbook string `json:"playbook,omitempty"` // Specifies the cluster on which the hook is to be executed. This is a required field. TargetCluster string `json:"targetCluster"` // Specifies the highest amount of time for which the hook will run. ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds,omitempty"` }
MigHookSpec defines the desired state of MigHook
func (*MigHookSpec) DeepCopy ¶
func (in *MigHookSpec) DeepCopy() *MigHookSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigHookSpec.
func (*MigHookSpec) DeepCopyInto ¶
func (in *MigHookSpec) DeepCopyInto(out *MigHookSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigHookStatus ¶
type MigHookStatus struct { Conditions `json:","` ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
MigHookStatus defines the observed state of MigHook
func (*MigHookStatus) DeepCopy ¶
func (in *MigHookStatus) DeepCopy() *MigHookStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigHookStatus.
func (*MigHookStatus) DeepCopyInto ¶
func (in *MigHookStatus) DeepCopyInto(out *MigHookStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigMigration ¶
type MigMigration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MigMigrationSpec `json:"spec,omitempty"` Status MigMigrationStatus `json:"status,omitempty"` }
MigMigration is the Schema for the migmigrations API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="Plan",type=string,JSONPath=".spec.migPlanRef.name" +kubebuilder:printcolumn:name="Stage",type=string,JSONPath=".spec.stage" +kubebuilder:printcolumn:name="Rollback",type=string,JSONPath=".spec.rollback" +kubebuilder:printcolumn:name="Itinerary",type=string,JSONPath=".status.itinerary" +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func GetMigrationForDVM ¶
func GetMigrationForDVM(client k8sclient.Client, owners []metav1.OwnerReference) (*MigMigration, error)
Get a referenced Migration for DVM. Return nil if the reference cannot be resolved.
func ListMigrations ¶
func ListMigrations(client k8sclient.Client) ([]MigMigration, error)
List MigMigrations Returns and empty list when none found.
func (*MigMigration) AddErrors ¶
func (r *MigMigration) AddErrors(errors []string)
Add (de-duplicated) errors.
func (*MigMigration) DeepCopy ¶
func (in *MigMigration) DeepCopy() *MigMigration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigMigration.
func (*MigMigration) DeepCopyInto ¶
func (in *MigMigration) DeepCopyInto(out *MigMigration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigMigration) DeepCopyObject ¶
func (in *MigMigration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MigMigration) GetCorrelationLabel ¶
func (r *MigMigration) GetCorrelationLabel() (string, string)
func (*MigMigration) GetCorrelationLabels ¶
func (r *MigMigration) GetCorrelationLabels() map[string]string
Migration
func (*MigMigration) GetName ¶
func (r *MigMigration) GetName() string
func (*MigMigration) GetNamespace ¶
func (r *MigMigration) GetNamespace() string
func (*MigMigration) GetPlan ¶
func (r *MigMigration) GetPlan(client k8sclient.Client) (*MigPlan, error)
GetPlan - Get the migration plan. Returns `nil` when the reference cannot be resolved.
func (*MigMigration) HasErrors ¶
func (r *MigMigration) HasErrors() bool
HasErrors will notify about error presence on the MigMigration resource
func (*MigMigration) HasReconciled ¶
func (r *MigMigration) HasReconciled() bool
func (*MigMigration) IsHealthy ¶
func (m *MigMigration) IsHealthy() bool
IsHealthy will report if there are any unhealthy namespaces were present
func (*MigMigration) IsStateMigration ¶
func (r *MigMigration) IsStateMigration() bool
IsStateMigration checks whether state migration annotation is present
func (*MigMigration) MarkReconciled ¶
func (r *MigMigration) MarkReconciled()
type MigMigrationList ¶
type MigMigrationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MigMigration `json:"items"` }
MigMigrationList contains a list of MigMigration
func (*MigMigrationList) DeepCopy ¶
func (in *MigMigrationList) DeepCopy() *MigMigrationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigMigrationList.
func (*MigMigrationList) DeepCopyInto ¶
func (in *MigMigrationList) DeepCopyInto(out *MigMigrationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigMigrationList) DeepCopyObject ¶
func (in *MigMigrationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MigMigrationSpec ¶
type MigMigrationSpec struct { MigPlanRef *kapi.ObjectReference `json:"migPlanRef,omitempty"` // Invokes the stage operation, when set to true the migration controller switches to stage itinerary. This is a required field. Stage bool `json:"stage"` // Invokes the state migration operation MigrateState bool `json:"migrateState,omitempty"` // Specifies whether to quiesce the application Pods before migrating Persistent Volume data. QuiescePods bool `json:"quiescePods,omitempty"` // Specifies whether to retain the annotations set by the migration controller or not. KeepAnnotations bool `json:"keepAnnotations,omitempty"` // Specifies whether to verify the health of the migrated pods or not. Verify bool `json:"verify,omitempty"` // Invokes the cancel migration operation, when set to true the migration controller switches to cancel itinerary. This field can be used on-demand to cancel the running migration. Canceled bool `json:"canceled,omitempty"` // Invokes the rollback migration operation, when set to true the migration controller switches to rollback itinerary. This field needs to be set prior to creation of a MigMigration. Rollback bool `json:"rollback,omitempty"` // If set True, run rsync operations with escalated privileged, takes precedence over setting RunAsUser and RunAsGroup RunAsRoot *bool `json:"runAsRoot,omitempty"` // If set, runs rsync operations with provided user id. This provided user id should be a valid one that falls within the range of allowed UID of user namespace RunAsUser *int64 `json:"runAsUser,omitempty"` // If set, runs rsync operations with provided group id. This provided user id should be a valid one that falls within the range of allowed GID of user namespace RunAsGroup *int64 `json:"runAsGroup,omitempty"` }
MigMigrationSpec defines the desired state of MigMigration
func (*MigMigrationSpec) DeepCopy ¶
func (in *MigMigrationSpec) DeepCopy() *MigMigrationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigMigrationSpec.
func (*MigMigrationSpec) DeepCopyInto ¶
func (in *MigMigrationSpec) DeepCopyInto(out *MigMigrationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigMigrationStatus ¶
type MigMigrationStatus struct { Conditions `json:",inline"` UnhealthyResources `json:",inline"` ObservedDigest string `json:"observedDigest,omitempty"` StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` Phase string `json:"phase,omitempty"` Pipeline []*Step `json:"pipeline,omitempty"` Itinerary string `json:"itinerary,omitempty"` Errors []string `json:"errors,omitempty"` }
MigMigrationStatus defines the observed state of MigMigration
func (*MigMigrationStatus) AddStep ¶
func (s *MigMigrationStatus) AddStep(step *Step)
AddStep adds a new step to the pipeline
func (*MigMigrationStatus) DeepCopy ¶
func (in *MigMigrationStatus) DeepCopy() *MigMigrationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigMigrationStatus.
func (*MigMigrationStatus) DeepCopyInto ¶
func (in *MigMigrationStatus) DeepCopyInto(out *MigMigrationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigMigrationStatus) FindStep ¶
func (s *MigMigrationStatus) FindStep(stepName string) *Step
FindStep find step by name
func (*MigMigrationStatus) ReflectPipeline ¶
func (s *MigMigrationStatus) ReflectPipeline()
ReflectPipeline reflects pipeline
type MigPlan ¶
type MigPlan struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MigPlanSpec `json:"spec,omitempty"` Status MigPlanStatus `json:"status,omitempty"` }
MigPlan is the Schema for the migplans API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="Source",type=string,JSONPath=".spec.srcMigClusterRef.name" +kubebuilder:printcolumn:name="Target",type=string,JSONPath=".spec.destMigClusterRef.name" +kubebuilder:printcolumn:name="Storage",type=string,JSONPath=".spec.migStorageRef.name" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func ListPlansWithLabels ¶
List MigPlans with labels Returns and empty list when none found.
func (*MigPlan) BuildRegistryDeployment ¶
func (r *MigPlan) BuildRegistryDeployment(storage *MigStorage, proxySecret *kapi.Secret, name, dirName, registryImage string, mCorrelationLabels map[string]string, livenessTimeout int32, readinessTimeout int32) *appsv1.Deployment
Build a Registry Deployment.
func (*MigPlan) BuildRegistrySecret ¶
func (r *MigPlan) BuildRegistrySecret(client k8sclient.Client, storage *MigStorage) (*kapi.Secret, error)
Build a credentials Secret as desired for the source cluster.
func (*MigPlan) BuildRegistryService ¶
Build a Registry Service as desired for the specified cluster.
func (*MigPlan) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigPlan.
func (*MigPlan) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigPlan) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MigPlan) EqualsRegistryDeployment ¶
func (r *MigPlan) EqualsRegistryDeployment(a, b *appsv1.Deployment) bool
Determine if two deployments are equal. Returns `true` when equal.
func (*MigPlan) EqualsRegistrySecret ¶
Determine if two registry credentials secrets are equal. Returns `true` when equal.
func (*MigPlan) EqualsRegistryService ¶
Determine if two services are equal. Returns `true` when equal.
func (*MigPlan) GetCloudSecret ¶
func (r *MigPlan) GetCloudSecret(client k8sclient.Client, provider pvdr.Provider) (*kapi.Secret, error)
Get the cloud credentials secret by labels for the provider.
func (*MigPlan) GetCorrelationLabel ¶
func (*MigPlan) GetCorrelationLabels ¶
Plan
func (*MigPlan) GetDestinationCluster ¶
func (r *MigPlan) GetDestinationCluster(client k8sclient.Client) (*MigCluster, error)
GetDestinationCluster - Get the referenced destination cluster. Returns `nil` when the reference cannot be resolved.
func (*MigPlan) GetDestinationNamespaces ¶
GetDestinationNamespaces get destination namespaces without mapping
func (*MigPlan) GetIncludedResourcesList ¶
func (r *MigPlan) GetIncludedResourcesList(client k8sclient.Client) (validResources []string, invalidResources []string, err error)
GetIncludedResourcesList returns list of string representation of Resource Group/Kinds provided through spec.IncludedResources of the plan, returns list of invalid resources and aggregated errors if one or more resources are invalid in the provided list
func (*MigPlan) GetMigrationType ¶
func (r *MigPlan) GetMigrationType() MigrationType
func (*MigPlan) GetNamespace ¶
func (*MigPlan) GetNamespaceMapping ¶
GetNamespaceMapping gets a map of src to dest namespaces
func (*MigPlan) GetProxySecret ¶
Get registry proxy secret for registry DC Returns nil if secret isn't found or no configuration exists
func (*MigPlan) GetRefResources ¶
func (r *MigPlan) GetRefResources(client k8sclient.Client) (*PlanResources, error)
GetRefResources gets referenced resources from a MigPlan.
func (*MigPlan) GetRegistryDeployment ¶
Get an existing registry Deployment on the specified cluster. TODO: We need to convert this from a list call to a get call. The name of the deployment is equal to the name of the secret
func (*MigPlan) GetRegistrySecret ¶
Get an existing credentials Secret on the source cluster.
func (*MigPlan) GetRegistryService ¶
Get an existing registry Service on the specifiedcluster. TODO: We need to convert this from a list call to a get call. The name of the deployment is equal to the name of the secret
func (*MigPlan) GetSourceCluster ¶
func (r *MigPlan) GetSourceCluster(client k8sclient.Client) (*MigCluster, error)
GetSourceCluster - Get the referenced source cluster. Returns `nil` when the reference cannot be resolved.
func (*MigPlan) GetSourceNamespaces ¶
GetSourceNamespaces get source namespaces without mapping
func (*MigPlan) GetStorage ¶
func (r *MigPlan) GetStorage(client k8sclient.Client) (*MigStorage, error)
GetStorage - Get the referenced storage. Returns `nil` when the reference cannot be resolved.
func (*MigPlan) HasConflict ¶
Get whether the plan conflicts with another. Plans conflict when:
- Have any of the clusters in common AND
- Have any of the namespaces in common AND
- Have any of the PVs in common
func (*MigPlan) HasReconciled ¶
func (*MigPlan) IsImageMigrationDisabled ¶
IsImageMigrationDisabled returns whether this MigPlan has disable_image_copy or disabled_image_migration disable_image_copy is a flag available as a controller boolean env var. disabled_image_migration is currently implemented site-wide via the ExcludedResources list. This This will change to an explicit controller boolean env var at some point.
func (*MigPlan) IsIntraCluster ¶
IsIntraCluster tells whether source and destination in the plan point to the same cluster
func (*MigPlan) IsResourceExcluded ¶
GetDestinationNamespaces get destination namespaces without mapping
func (*MigPlan) IsVolumeMigrationDisabled ¶
IsVolumeMigrationDisabled returns whether this MigPlan has disabled Volume Migration Currently this is only implemented site-wide via the ExcludedResources list. This This will change to an explicit controller boolean env var at some point.
func (*MigPlan) ListMigrations ¶
func (r *MigPlan) ListMigrations(client k8sclient.Client) ([]*MigMigration, error)
Get list of migrations associated with the plan. Sorted by created timestamp with final migrations grouped last.
func (*MigPlan) LiveMigrationChecked ¶
func (*MigPlan) MarkReconciled ¶
func (r *MigPlan) MarkReconciled()
func (*MigPlan) UpdateRegistryDeployment ¶
func (r *MigPlan) UpdateRegistryDeployment(storage *MigStorage, deployment *appsv1.Deployment, proxySecret *kapi.Secret, name, dirName, registryImage string, mCorrelationLabels map[string]string, livenessTimeout int32, readinessTimeout int32)
Update a Registry Deployment as desired for the specified cluster.
func (*MigPlan) UpdateRegistrySecret ¶
func (r *MigPlan) UpdateRegistrySecret(client k8sclient.Client, storage *MigStorage, registrySecret *kapi.Secret) error
Update a Registry credentials secret as desired for the specified cluster.
type MigPlanHook ¶
type MigPlanHook struct { Reference *kapi.ObjectReference `json:"reference"` // Indicates the phase when the hooks will be executed. Acceptable values are: PreBackup, PostBackup, PreRestore, and PostRestore. Phase string `json:"phase"` // Holds the name of the namespace where hooks should be implemented. ExecutionNamespace string `json:"executionNamespace"` // Holds the name of the service account to be used for running hooks. ServiceAccount string `json:"serviceAccount"` }
MigPlanHook hold a reference to a MigHook along with the desired phase to run it in
func (*MigPlanHook) DeepCopy ¶
func (in *MigPlanHook) DeepCopy() *MigPlanHook
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigPlanHook.
func (*MigPlanHook) DeepCopyInto ¶
func (in *MigPlanHook) DeepCopyInto(out *MigPlanHook)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigPlanList ¶
type MigPlanList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MigPlan `json:"items"` }
MigPlanList contains a list of MigPlan
func (*MigPlanList) DeepCopy ¶
func (in *MigPlanList) DeepCopy() *MigPlanList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigPlanList.
func (*MigPlanList) DeepCopyInto ¶
func (in *MigPlanList) DeepCopyInto(out *MigPlanList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigPlanList) DeepCopyObject ¶
func (in *MigPlanList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MigPlanSpec ¶
type MigPlanSpec struct { // Holds all the persistent volumes found for the namespaces included in migplan. Each entry is a persistent volume with the information. Name - The PV name. Capacity - The PV storage capacity. StorageClass - The PV storage class name. Supported - Lists of what is supported. Selection - Choices made from supported. PVC - Associated PVC. NFS - NFS properties. staged - A PV has been explicitly added/updated. PersistentVolumes `json:",inline"` // Holds names of all the namespaces to be included in migration. Namespaces []string `json:"namespaces,omitempty"` SrcMigClusterRef *kapi.ObjectReference `json:"srcMigClusterRef,omitempty"` DestMigClusterRef *kapi.ObjectReference `json:"destMigClusterRef,omitempty"` MigStorageRef *kapi.ObjectReference `json:"migStorageRef,omitempty"` // If the migration was successful for a migplan, this value can be set True indicating that after one successful migration no new migrations can be carried out for this migplan. Closed bool `json:"closed,omitempty"` // Holds a reference to a MigHook along with the desired phase to run it in. Hooks []MigPlanHook `json:"hooks,omitempty"` // If set True, the controller is forced to check if the migplan is in Ready state or not. Refresh bool `json:"refresh,omitempty"` // If set True, disables direct image migrations. IndirectImageMigration bool `json:"indirectImageMigration,omitempty"` // If set True, disables direct volume migrations. IndirectVolumeMigration bool `json:"indirectVolumeMigration,omitempty"` // IncludedResources optional list of included resources in Velero Backup // When not set, all the resources are included in the backup // +kubebuilder:validation:Optional IncludedResources []*metav1.GroupKind `json:"includedResources,omitempty"` // LabelSelector optional label selector on the included resources in Velero Backup // +kubebuilder:validation:Optional LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` // LiveMigrate optional flag to enable live migration of VMs during direct volume migration // Only running VMs when the plan is executed will be live migrated // +kubebuilder:validation:Optional LiveMigrate *bool `json:"liveMigrate,omitempty"` }
MigPlanSpec defines the desired state of MigPlan
func (*MigPlanSpec) DeepCopy ¶
func (in *MigPlanSpec) DeepCopy() *MigPlanSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigPlanSpec.
func (*MigPlanSpec) DeepCopyInto ¶
func (in *MigPlanSpec) DeepCopyInto(out *MigPlanSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigPlanStatus ¶
type MigPlanStatus struct { UnhealthyResources `json:",inline"` Conditions `json:",inline"` Incompatible `json:",inline"` Suffix *string `json:"suffix,omitempty"` ObservedDigest string `json:"observedDigest,omitempty"` ExcludedResources []string `json:"excludedResources,omitempty"` SrcStorageClasses []StorageClass `json:"srcStorageClasses,omitempty"` DestStorageClasses []StorageClass `json:"destStorageClasses,omitempty"` }
MigPlanStatus defines the observed state of MigPlan
func (*MigPlanStatus) DeepCopy ¶
func (in *MigPlanStatus) DeepCopy() *MigPlanStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigPlanStatus.
func (*MigPlanStatus) DeepCopyInto ¶
func (in *MigPlanStatus) DeepCopyInto(out *MigPlanStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigStorage ¶
type MigStorage struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MigStorageSpec `json:"spec,omitempty"` Status MigStorageStatus `json:"status,omitempty"` }
MigStorage is the Schema for the migstorages API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="BackupStorageProvider",type=string,JSONPath=".spec.backupStorageProvider" +kubebuilder:printcolumn:name="VolumeSnapshotProvider",type=string,JSONPath=".spec.volumeSnapshotProvider" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func GetStorage ¶
func GetStorage(client k8sclient.Client, ref *kapi.ObjectReference) (*MigStorage, error)
Get a referenced MigStorage. Returns `nil` when the reference cannot be resolved.
func ListStorage ¶
func ListStorage(client k8sclient.Client) ([]MigStorage, error)
List MigStorage Returns and empty list when none found.
func (*MigStorage) BuildBSL ¶
func (r *MigStorage) BuildBSL() *velero.BackupStorageLocation
Build BSL.
func (*MigStorage) BuildBSLCloudSecret ¶
func (r *MigStorage) BuildBSLCloudSecret() *kapi.Secret
Build backup cloud-secret.
func (*MigStorage) BuildVSL ¶
func (r *MigStorage) BuildVSL(planUID string) *velero.VolumeSnapshotLocation
Build VSL. planUID param is a workaround for velero, needed until velero restore accepts a VSL attibute when the name differs from the backup
func (*MigStorage) BuildVSLCloudSecret ¶
func (r *MigStorage) BuildVSLCloudSecret() *kapi.Secret
Build snapshot cloud-secret.
func (*MigStorage) DeepCopy ¶
func (in *MigStorage) DeepCopy() *MigStorage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigStorage.
func (*MigStorage) DeepCopyInto ¶
func (in *MigStorage) DeepCopyInto(out *MigStorage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigStorage) DeepCopyObject ¶
func (in *MigStorage) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MigStorage) EqualsBSL ¶
func (r *MigStorage) EqualsBSL(a, b *velero.BackupStorageLocation) bool
Determine if two BSLs are equal based on relevant fields in the Spec. Returns `true` when equal.
func (*MigStorage) EqualsCloudSecret ¶
func (r *MigStorage) EqualsCloudSecret(a, b *kapi.Secret) bool
Determine if two secrets cloud secrets are equal. Returns `true` when equal.
func (*MigStorage) EqualsVSL ¶
func (r *MigStorage) EqualsVSL(a, b *velero.VolumeSnapshotLocation) bool
Determine if two VSLs are equal based on relevant fields in the Spec. Returns `true` when equal.
func (*MigStorage) GetBackupStorageCredSecret ¶
Get the backup credentials secret. If the secret is not found it returns nil
func (*MigStorage) GetBackupStorageProvider ¶
func (r *MigStorage) GetBackupStorageProvider() pvdr.Provider
Get the backup storage cloud provider.
func (*MigStorage) GetCorrelationLabel ¶
func (r *MigStorage) GetCorrelationLabel() (string, string)
func (*MigStorage) GetCorrelationLabels ¶
func (r *MigStorage) GetCorrelationLabels() map[string]string
Storage
func (*MigStorage) GetName ¶
func (r *MigStorage) GetName() string
func (*MigStorage) GetNamespace ¶
func (r *MigStorage) GetNamespace() string
func (*MigStorage) GetVolumeSnapshotCredSecret ¶
Get the backup credentials secret. If the secret is not found it returns nil
func (*MigStorage) GetVolumeSnapshotProvider ¶
func (r *MigStorage) GetVolumeSnapshotProvider() pvdr.Provider
Get the volume snapshot cloud provider.
func (*MigStorage) HasReconciled ¶
func (r *MigStorage) HasReconciled() bool
func (*MigStorage) MarkReconciled ¶
func (r *MigStorage) MarkReconciled()
type MigStorageList ¶
type MigStorageList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MigStorage `json:"items"` }
MigStorageList contains a list of MigStorage
func (*MigStorageList) DeepCopy ¶
func (in *MigStorageList) DeepCopy() *MigStorageList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigStorageList.
func (*MigStorageList) DeepCopyInto ¶
func (in *MigStorageList) DeepCopyInto(out *MigStorageList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigStorageList) DeepCopyObject ¶
func (in *MigStorageList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MigStorageSpec ¶
type MigStorageSpec struct { // Holds the provider name whose object storage is used for backup storage location. This is a required field. BackupStorageProvider string `json:"backupStorageProvider"` // Defines config for creating and storing Backups. This is a required field. BackupStorageConfig `json:"backupStorageConfig"` // Holds the provider name whose object storage is used for backup storage location. VolumeSnapshotProvider string `json:"volumeSnapshotProvider,omitempty"` // Defines config for taking Volume Snapshots. VolumeSnapshotConfig `json:"volumeSnapshotConfig,omitempty"` // Triggers a reconcile for the MigStorage CRD. Refresh bool `json:"refresh,omitempty"` }
MigStorageSpec defines the desired state of MigStorage
func (*MigStorageSpec) DeepCopy ¶
func (in *MigStorageSpec) DeepCopy() *MigStorageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigStorageSpec.
func (*MigStorageSpec) DeepCopyInto ¶
func (in *MigStorageSpec) DeepCopyInto(out *MigStorageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigStorageStatus ¶
type MigStorageStatus struct { Conditions `json:",inline"` ObservedDigest string `json:"observedDigest,omitempty"` }
MigStorageStatus defines the observed state of MigStorage
func (*MigStorageStatus) DeepCopy ¶
func (in *MigStorageStatus) DeepCopy() *MigStorageStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigStorageStatus.
func (*MigStorageStatus) DeepCopyInto ¶
func (in *MigStorageStatus) DeepCopyInto(out *MigStorageStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigrationType ¶
type MigrationType string
const ( StorageConversionPlan MigrationType = "StorageConversionPlan" StateMigrationPlan MigrationType = "StateMigrationPlan" NamespaceMigrationPlan MigrationType = "NamespaceMigrationPlan" )
type PV ¶
type PV struct { Name string `json:"name,omitempty"` Capacity resource.Quantity `json:"capacity,omitempty"` StorageClass string `json:"storageClass,omitempty"` Supported Supported `json:"supported"` Selection Selection `json:"selection"` PVC PVC `json:"pvc,omitempty"` NFS *kapi.NFSVolumeSource `json:"-"` CapacityConfirmed bool `json:"capacityConfirmed,omitempty"` ProposedCapacity resource.Quantity `json:"proposedCapacity,omitempty"` // contains filtered or unexported fields }
Name - The PV name. Capacity - The PV storage capacity. StorageClass - The PV storage class name. Supported - Lists of what is supported. Selection - Choices made from supported. PVC - Associated PVC. NFS - NFS properties. staged - A PV has been explicitly added/updated.
func (*PV) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PV.
func (*PV) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PVC ¶
type PVC struct { Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` AccessModes []kapi.PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` VolumeMode kapi.PersistentVolumeMode `json:"volumeMode,omitempty"` HasReference bool `json:"hasReference,omitempty"` }
PVC
func (*PVC) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PVC.
func (*PVC) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PVC) GetSourceName ¶
GetSourceName returns name of the source PVC
func (PVC) GetTargetName ¶
GetTargetName returns name of the target PVC
type PVCToMigrate ¶
type PVCToMigrate struct { *kapi.ObjectReference `json:",inline"` // TargetStorageClass storage class of the migrated PVC in the target cluster TargetStorageClass string `json:"targetStorageClass"` // TargetAccessModes access modes of the migrated PVC in the target cluster TargetAccessModes []kapi.PersistentVolumeAccessMode `json:"targetAccessModes"` // TargetNamespace namespace of the migrated PVC in the target cluster TargetNamespace string `json:"targetNamespace,omitempty"` // TargetName name of the migrated PVC in the target cluster // +kubebuilder:validation:Optional TargetName string `json:"targetName,omitempty"` // Verify set true to verify integrity of the data post migration Verify bool `json:"verify,omitempty"` }
func (*PVCToMigrate) DeepCopy ¶
func (in *PVCToMigrate) DeepCopy() *PVCToMigrate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PVCToMigrate.
func (*PVCToMigrate) DeepCopyInto ¶
func (in *PVCToMigrate) DeepCopyInto(out *PVCToMigrate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PersistentVolumes ¶
type PersistentVolumes struct { List []PV `json:"persistentVolumes,omitempty"` // contains filtered or unexported fields }
Collection of PVs List - The collection of PVs. index - List index. -------- Example: plan.Spec.BeginPvStaging() plan.Spec.AddPv(pvA) plan.Spec.AddPv(pvB) plan.Spec.AddPv(pvC) plan.Spec.EndPvStaging()
func (*PersistentVolumes) AddPv ¶
func (r *PersistentVolumes) AddPv(pv PV)
Add (or update) Pv to the collection.
func (*PersistentVolumes) BeginPvStaging ¶
func (r *PersistentVolumes) BeginPvStaging()
Begin staging PVs.
func (*PersistentVolumes) DeepCopy ¶
func (in *PersistentVolumes) DeepCopy() *PersistentVolumes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumes.
func (*PersistentVolumes) DeepCopyInto ¶
func (in *PersistentVolumes) DeepCopyInto(out *PersistentVolumes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PersistentVolumes) DeletePv ¶
func (r *PersistentVolumes) DeletePv(names ...string)
Delete a PV from the collection.
func (*PersistentVolumes) EndPvStaging ¶
func (r *PersistentVolumes) EndPvStaging()
End staging PVs and delete un-staged PVs from the list. The PVs are sorted by Name.
type PlanResources ¶
type PlanResources struct { MigPlan *MigPlan MigStorage *MigStorage SrcMigCluster *MigCluster DestMigCluster *MigCluster }
Resources referenced by the plan. Contains all of the fetched referenced resources.
func (*PlanResources) DeepCopy ¶
func (in *PlanResources) DeepCopy() *PlanResources
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanResources.
func (*PlanResources) DeepCopyInto ¶
func (in *PlanResources) DeepCopyInto(out *PlanResources)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodProgress ¶
type PodProgress struct { *kapi.ObjectReference `json:",inline"` PVCReference *kapi.ObjectReference `json:"pvcRef,omitempty"` LastObservedProgressPercent string `json:"lastObservedProgressPercent,omitempty"` LastObservedTransferRate string `json:"lastObservedTransferRate,omitempty"` TotalElapsedTime *metav1.Duration `json:"totalElapsedTime,omitempty"` }
func (*PodProgress) DeepCopy ¶
func (in *PodProgress) DeepCopy() *PodProgress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodProgress.
func (*PodProgress) DeepCopyInto ¶
func (in *PodProgress) DeepCopyInto(out *PodProgress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RsyncOperation ¶
type RsyncOperation struct { // PVCReference pvc to which this Rsync operation corresponds to PVCReference *kapi.ObjectReference `json:"pvcReference,omitempty"` // CurrentAttempt current ongoing attempt of an Rsync operation CurrentAttempt int `json:"currentAttempt,omitempty"` // Succeeded whether operation as a whole succeded Succeeded bool `json:"succeeded,omitempty"` // Failed whether operation as a whole failed Failed bool `json:"failed,omitempty"` }
RsyncOperation defines observed state of an Rsync Operation
func (*RsyncOperation) DeepCopy ¶
func (in *RsyncOperation) DeepCopy() *RsyncOperation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RsyncOperation.
func (*RsyncOperation) DeepCopyInto ¶
func (in *RsyncOperation) DeepCopyInto(out *RsyncOperation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RsyncOperation) Equal ¶
func (x *RsyncOperation) Equal(y *RsyncOperation) bool
func (*RsyncOperation) GetPVDetails ¶
func (r *RsyncOperation) GetPVDetails() (string, string)
func (*RsyncOperation) IsComplete ¶
func (r *RsyncOperation) IsComplete() bool
IsComplete tells whether the operation as a whole is in terminal state
func (*RsyncOperation) String ¶
func (r *RsyncOperation) String() string
type RsyncPodStatus ¶
type RsyncPodStatus struct { // PodName name of the Rsync Pod PodName string `json:"podName,omitempty"` // PodPhase phase of the Rsync Pod PodPhase kapi.PodPhase `json:"phase,omitempty"` // ExitCode exit code of terminated Rsync Pod ExitCode *int32 `json:"exitCode,omitempty"` // ContainerElapsedTime total execution time of Rsync Pod ContainerElapsedTime *metav1.Duration `json:"containerElapsedTime,omitempty"` // LogMessage few lines of tailed log of the Rsync Pod LogMessage string `json:"logMessage,omitempty"` // LastObservedProgressPercent progress of Rsync in percentage LastObservedProgressPercent string `json:"lastObservedProgressPercent,omitempty"` // LastObservedTransferRate rate of transfer of Rsync LastObservedTransferRate string `json:"lastObservedTransferRate,omitempty"` // CreationTimestamp pod creation time CreationTimestamp *metav1.Time `json:"creationTimestamp,omitempty"` }
RsyncPodStatus defines observed state of an Rsync attempt
func (*RsyncPodStatus) DeepCopy ¶
func (in *RsyncPodStatus) DeepCopy() *RsyncPodStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RsyncPodStatus.
func (*RsyncPodStatus) DeepCopyInto ¶
func (in *RsyncPodStatus) DeepCopyInto(out *RsyncPodStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Selection ¶
type Selection struct { Action string `json:"action,omitempty"` StorageClass string `json:"storageClass,omitempty"` AccessMode kapi.PersistentVolumeAccessMode `json:"accessMode,omitempty" protobuf:"bytes,1,rep,name=accessMode,casttype=PersistentVolumeAccessMode"` CopyMethod string `json:"copyMethod,omitempty"` Verify bool `json:"verify,omitempty"` }
Selection Action - The PV migration action (move|copy|skip) StorageClass - The PV storage class name to use in the destination cluster. AccessMode - The PV access mode to use in the destination cluster, if different from src PVC AccessMode CopyMethod - The PV copy method to use ('filesystem' for restic copy, or 'snapshot' for velero snapshot plugin) Verify - Whether or not to verify copied volume data if CopyMethod is 'filesystem'
func (*Selection) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selection.
func (*Selection) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Step ¶
type Step struct { Timed `json:",inline"` Name string `json:"name"` Phase string `json:"phase,omitempty"` Message string `json:"message,omitempty"` Progress []string `json:"progress,omitempty"` Failed bool `json:"failed,omitempty"` Skipped bool `json:"skipped,omitempty"` }
Step defines a task in a step of migration
func (*Step) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step.
func (*Step) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageClass ¶
type StorageClass struct { Name string `json:"name,omitempty"` Provisioner string `json:"provisioner,omitempty"` Default bool `json:"default,omitempty"` VolumeAccessModes []VolumeModeAccessMode `json:"volumeAccessModes,omitempty"` }
StorageClass is an available storage class in the cluster Name - the storage class name Provisioner - the dynamic provisioner for the storage class Default - whether or not this storage class is the default AccessModes - access modes supported by the dynamic provisioner
func (*StorageClass) DeepCopy ¶
func (in *StorageClass) DeepCopy() *StorageClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClass.
func (*StorageClass) DeepCopyInto ¶
func (in *StorageClass) DeepCopyInto(out *StorageClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Supported ¶
type Supported struct { Actions []string `json:"actions"` CopyMethods []string `json:"copyMethods"` }
Supported Actions - The list of supported actions CopyMethods - The list of supported copy methods
func (*Supported) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Supported.
func (*Supported) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Timed ¶
type Timed struct { // Started timestamp. Started *meta.Time `json:"started,omitempty"` // Completed timestamp. Completed *meta.Time `json:"completed,omitempty"` }
Timed records started and completed timestamps.
func (*Timed) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timed.
func (*Timed) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Timed) MarkedCompleted ¶
MarkedCompleted check if completed.
type UnhealthyNamespace ¶
type UnhealthyNamespace struct { Name string `json:"name"` Workloads []Workload `json:"workloads"` }
UnhealthyNamespace is a store for unhealthy resources in a namespace
func (*UnhealthyNamespace) DeepCopy ¶
func (in *UnhealthyNamespace) DeepCopy() *UnhealthyNamespace
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnhealthyNamespace.
func (*UnhealthyNamespace) DeepCopyInto ¶
func (in *UnhealthyNamespace) DeepCopyInto(out *UnhealthyNamespace)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnhealthyResources ¶
type UnhealthyResources struct {
Namespaces []UnhealthyNamespace `json:"namespaces,omitempty"`
}
UnhealthyResources is a store for unhealthy namespaces across clusters
func (*UnhealthyResources) AddNamespace ¶
func (u *UnhealthyResources) AddNamespace(cluster *[]UnhealthyNamespace, namespace, name string, resourceNames ...string)
AddNamespace is adding a workload to selected list of unhealthy namespaces
func (*UnhealthyResources) AddResources ¶
func (u *UnhealthyResources) AddResources( client k8sclient.Client, unhealthyNamespaces *[]UnhealthyNamespace, namespace string, unhealthy *[]unstructured.Unstructured, ) error
AddResources is adding unhealthy workloads and resolves owner references
func (*UnhealthyResources) DeepCopy ¶
func (in *UnhealthyResources) DeepCopy() *UnhealthyResources
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnhealthyResources.
func (*UnhealthyResources) DeepCopyInto ¶
func (in *UnhealthyResources) DeepCopyInto(out *UnhealthyResources)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UnhealthyResources) FindResources ¶
func (u *UnhealthyResources) FindResources(namespace string, unhealthyResources ...*[]UnhealthyNamespace) *UnhealthyNamespace
FindResources is responsible for returning a pointer on a single unhealthy namespace entry
func (*UnhealthyResources) FindWorkload ¶
func (u *UnhealthyResources) FindWorkload(resources *UnhealthyNamespace, name string) *Workload
FindWorkload will return a workload from the namespace, which match the name. If there is any.
type VolumeModeAccessMode ¶
type VolumeModeAccessMode struct { VolumeMode kapi.PersistentVolumeMode `json:"volumeMode,omitempty"` AccessModes []kapi.PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` }
func (*VolumeModeAccessMode) DeepCopy ¶
func (in *VolumeModeAccessMode) DeepCopy() *VolumeModeAccessMode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeModeAccessMode.
func (*VolumeModeAccessMode) DeepCopyInto ¶
func (in *VolumeModeAccessMode) DeepCopyInto(out *VolumeModeAccessMode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeSnapshotConfig ¶
type VolumeSnapshotConfig struct { CredsSecretRef *kapi.ObjectReference `json:"credsSecretRef,omitempty"` SnapshotCreationTimeout string `json:"snapshotCreationTimeout,omitempty"` AwsRegion string `json:"awsRegion,omitempty"` AzureAPITimeout string `json:"azureApiTimeout,omitempty"` AzureResourceGroup string `json:"azureResourceGroup,omitempty"` }
VolumeSnapshotConfig defines config for taking Volume Snapshots
func (*VolumeSnapshotConfig) DeepCopy ¶
func (in *VolumeSnapshotConfig) DeepCopy() *VolumeSnapshotConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotConfig.
func (*VolumeSnapshotConfig) DeepCopyInto ¶
func (in *VolumeSnapshotConfig) DeepCopyInto(out *VolumeSnapshotConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VolumeSnapshotConfig) GetCredSecret ¶
Get credentials secret.
func (*VolumeSnapshotConfig) GetProvider ¶
func (r *VolumeSnapshotConfig) GetProvider(name string) pvdr.Provider
Get the cloud provider.
type Workload ¶
Workload is a store for unhealthy resource and it's dependents
func (*Workload) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.
func (*Workload) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files
¶
- annotations.go
- condition.go
- directimagemigration_types.go
- directimagestreammigration_types.go
- directvolumemigration_types.go
- directvolumemigrationprogress_types.go
- doc.go
- gvk.go
- labels.go
- miganalytic_types.go
- migcluster_types.go
- mighook_types.go
- migmigration_types.go
- migplan_types.go
- migstorage_types.go
- model.go
- owner_reference.go
- register.go
- resource.go
- timed.go
- verify.go
- zz_generated.deepcopy.go