v1alpha1

package
v0.0.0-...-ec8378c Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 49 Imported by: 2

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

View Source
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"
	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

View Source
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

View Source
const (
	// Disables the internal image copy
	DisableImageCopy         = "migration.openshift.io/disable-image-copy"
	StateMigrationAnnotation = "migration.openshift.io/state-transfer"
)

Migration Annotations

View Source
const (
	ReconcileFailed = "ReconcileFailed"
	Ready           = "Ready"
	Running         = "Running"
	Failed          = "Failed"
	Succeeded       = "Succeeded"
)

Types

View Source
const (
	True  = "True"
	False = "False"
)

Status

View Source
const (
	NotFound    = "NotFound"
	NotSet      = "NotSet"
	NotDistinct = "NotDistinct"
	NotReady    = "NotReady"
)

Reasons

View Source
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.

View Source
const (
	PartOfLabel = "app.kubernetes.io/part-of" // = Application
	Application = "openshift-migration"
)

Common labels

View Source
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.

View Source
const (
	ExtendedPVAnalysisFailed  = "ExtendedPVAnalysisFailed"
	ExtendedPVAnalysisStarted = "ExtendedPVAnalysisStarted"
)

VolumeAdjuster condition types

View Source
const (
	FailedRunningDf = "FailedRunningDf"
	FailedRunningDu = "FailedRunningDu"
)

VolumeAdjuster reasons

View Source
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

View Source
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

View Source
const (
	RegistryDefaultProbeTimeout       = 300
	RegistryDefaultHealthcheckSubpath = "/v2/_catalog?n=5"
)

constants

View Source
const (
	HookPhaseLabel       = "phase"
	HookOwnerLabel       = "owner"
	PreBackupHookPhase   = "PreBackup"
	PostBackupHookPhase  = "PostBackup"
	PreRestoreHookPhase  = "PreRestore"
	PostRestoreHookPhase = "PostRestore"
)
View Source
const (
	StorageConversionPVCNamePrefix = "new"
	MigrationTypeIdentified        = "MigrationTypeIdentified"
)
View Source
const (
	PvMoveAction = "move"
	PvCopyAction = "copy"
	PvSkipAction = "skip"
)

PV Actions.

View Source
const (
	PvFilesystemCopyMethod = "filesystem"
	PvSnapshotCopyMethod   = "snapshot"
)

PV Copy Methods.

View Source
const (
	AWS   = pvdr.AWS
	Azure = pvdr.Azure
	GCP   = pvdr.GCP
)

Cloud Providers.

View Source
const (
	MigplanMigrationRunning = "migplan.migration.openshift.io/running"
	MigplanMigrationFailed  = "migplan.migration.openshift.io/failed"
)
View Source
const (
	TouchAnnotation             = "openshift.io/touch"
	VeleroNamespace             = "openshift-migration"
	OpenshiftMigrationNamespace = "openshift-migration"
)
View Source
const (
	ClosedIndexField = "closed"
)

Cache Indexes.

View Source
const (
	// DVMPDoneLabelKey used to track progress of dvmp operations
	DVMPDoneLabelKey = "migration.openshift.io/dvmp-done"
)
View Source
const (
	MigrationRegistryLabel = "migration.openshift.io/migration-registry"
)

Registry labels for controller-created migration registry resources

View Source
const (
	PlanIndexField = "planRef"
)

Cache Indexes.

View Source
const RSYNC_ENDPOINT_TYPE = "RSYNC_ENDPOINT_TYPE"
View Source
const (
	SaToken = "saToken"
)

SA secret keys.

Variables

View Source
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
)
View Source
var Settings = &settings.Settings

Functions

func AreRestConfigsEqual

func AreRestConfigsEqual(c1, c2 *rest.Config) bool

AreRestConfigsEqual given a new rest config, checks whether cluster's config is equal to it

func CorrelationLabel

func CorrelationLabel(r interface{}, uid types.UID) (key, value string)

Build label (key, value) used to correlate CRs. Format: <kind>: <uid>. The <uid> should be the ObjectMeta.UID

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 GetSecret

func GetSecret(client k8sclient.Client, ref *kapi.ObjectReference) (*kapi.Secret, error)

Get a referenced Secret. Returns `nil` when the reference cannot be resolved.

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

func SetOwnerReference

func SetOwnerReference(owner metav1.Object, ownerType runtime.Object, dim metav1.Object)

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

func (r *BackupStorageConfig) GetCredSecret(client k8sclient.Client) (*kapi.Secret, error)

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

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Condition) Equal

func (r *Condition) Equal(other Condition) bool

Get whether the conditions are equal.

func (*Condition) ExpandItems

func (r *Condition) ExpandItems()

Replace [] in `Message` with the content of `Items`.

func (*Condition) Update

func (r *Condition) Update(other Condition)

Update this condition with another's fields.

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

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

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"`
}

DirectImageMigrationSpec defines the desired state of DirectImageMigration

func (*DirectImageMigrationSpec) DeepCopy

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageMigrationStatus.

func (*DirectImageMigrationStatus) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageStreamMigration.

func (*DirectImageStreamMigration) DeepCopyInto

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

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 (*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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageStreamMigrationList.

func (*DirectImageStreamMigrationList) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageStreamMigrationSpec.

func (*DirectImageStreamMigrationSpec) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectImageStreamMigrationStatus.

func (*DirectImageStreamMigrationStatus) DeepCopyInto

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) DeepCopy

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) 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) 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) MarkReconciled

func (r *DirectVolumeMigration) MarkReconciled()

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationList.

func (*DirectVolumeMigrationList) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationProgress.

func (*DirectVolumeMigrationProgress) DeepCopyInto

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

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationProgressList.

func (*DirectVolumeMigrationProgressList) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationProgressSpec.

func (*DirectVolumeMigrationProgressSpec) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationProgressStatus.

func (*DirectVolumeMigrationProgressStatus) DeepCopyInto

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"`
}

DirectVolumeMigrationSpec defines the desired state of DirectVolumeMigration

func (*DirectVolumeMigrationSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationSpec.

func (*DirectVolumeMigrationSpec) DeepCopyInto

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"`
	RsyncOperations  []*RsyncOperation `json:"rsyncOperations,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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectVolumeMigrationStatus.

func (*DirectVolumeMigrationStatus) DeepCopyInto

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 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

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

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 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

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

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigAnalyticPersistentVolumeClaim.

func (*MigAnalyticPersistentVolumeClaim) DeepCopyInto

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

func (m *MigCluster) BuildRestConfig(c k8sclient.Client) (*rest.Config, error)

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

func (m *MigCluster) DeleteResources(client k8sclient.Client, labels map[string]string) error

Delete resources on the cluster by label.

func (*MigCluster) GetClient

func (m *MigCluster) GetClient(c k8sclient.Client) (compat.Client, error)

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 (m *MigCluster) GetClusterConfigMap(c k8sclient.Client) (*corev1.ConfigMap, error)

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

func (m *MigCluster) GetServiceAccountSecret(client k8sclient.Client) (*kapi.Secret, error)

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

func (m *MigCluster) TestConnection(c k8sclient.Client, timeout time.Duration) error

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 ListHook

func ListHook(client k8sclient.Client) ([]MigHook, error)

List MigHook Returns and empty list when none found.

func (*MigHook) DeepCopy

func (in *MigHook) DeepCopy() *MigHook

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigHook.

func (*MigHook) DeepCopyInto

func (in *MigHook) DeepCopyInto(out *MigHook)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MigHook) DeepCopyObject

func (in *MigHook) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*MigHook) GetCorrelationLabel

func (r *MigHook) GetCorrelationLabel() (string, string)

func (*MigHook) GetCorrelationLabels

func (r *MigHook) GetCorrelationLabels() map[string]string

Hook

func (*MigHook) GetName

func (r *MigHook) GetName() string

func (*MigHook) GetNamespace

func (r *MigHook) GetNamespace() string

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 (r *MigHook) HasReconciled() bool

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 GetPlan

func GetPlan(client k8sclient.Client, ref *kapi.ObjectReference) (*MigPlan, error)

Get a referenced MigPlan. Returns `nil` when the reference cannot be resolved.

func ListPlans

func ListPlans(client k8sclient.Client) ([]MigPlan, error)

List `open` MigPlans Returns and empty list when none found.

func ListPlansWithLabels

func ListPlansWithLabels(client k8sclient.Client, labels map[string]string) ([]MigPlan, error)

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

func (r *MigPlan) BuildRegistryService(name string) *kapi.Service

Build a Registry Service as desired for the specified cluster.

func (*MigPlan) DeepCopy

func (in *MigPlan) DeepCopy() *MigPlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigPlan.

func (*MigPlan) DeepCopyInto

func (in *MigPlan) DeepCopyInto(out *MigPlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MigPlan) DeepCopyObject

func (in *MigPlan) DeepCopyObject() runtime.Object

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

func (r *MigPlan) EqualsRegistrySecret(a, b *kapi.Secret) bool

Determine if two registry credentials secrets are equal. Returns `true` when equal.

func (*MigPlan) EqualsRegistryService

func (r *MigPlan) EqualsRegistryService(a, b *kapi.Service) bool

Determine if two services are equal. Returns `true` when equal.

func (*MigPlan) GetBSL

func (r *MigPlan) GetBSL(client k8sclient.Client) (*velero.BackupStorageLocation, error)

Get an associated BSL by Label search. Returns `nil` when not found.

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 (r *MigPlan) GetCorrelationLabel() (string, string)

func (*MigPlan) GetCorrelationLabels

func (r *MigPlan) GetCorrelationLabels() map[string]string

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

func (r *MigPlan) GetDestinationNamespaces() []string

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) GetName

func (r *MigPlan) GetName() string

func (*MigPlan) GetNamespace

func (r *MigPlan) GetNamespace() string

func (*MigPlan) GetNamespaceMapping

func (r *MigPlan) GetNamespaceMapping() map[string]string

GetNamespaceMapping gets a map of src to dest namespaces

func (*MigPlan) GetProxySecret

func (r *MigPlan) GetProxySecret(client k8sclient.Client) (*kapi.Secret, error)

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

func (r *MigPlan) GetRegistryDeployment(client k8sclient.Client) (*appsv1.Deployment, error)

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

func (r *MigPlan) GetRegistrySecret(client k8sclient.Client) (*kapi.Secret, error)

Get an existing credentials Secret on the source cluster.

func (*MigPlan) GetRegistryService

func (r *MigPlan) GetRegistryService(client k8sclient.Client) (*kapi.Service, error)

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

func (r *MigPlan) GetSourceNamespaces() []string

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) GetVSL

Get an associated VSL by Label search. Returns `nil` when not found.

func (*MigPlan) HasConflict

func (r *MigPlan) HasConflict(plan *MigPlan) bool

Get whether the plan conflicts with another. Plans conflict when:

  • Have any of the clusters in common.
  • Hand any of the namespaces in common.

func (*MigPlan) HasReconciled

func (r *MigPlan) HasReconciled() bool

func (*MigPlan) IsImageMigrationDisabled

func (r *MigPlan) IsImageMigrationDisabled() bool

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

func (r *MigPlan) IsIntraCluster(client k8sclient.Client) (bool, error)

IsIntraCluster tells whether source and destination in the plan point to the same cluster

func (*MigPlan) IsResourceExcluded

func (r *MigPlan) IsResourceExcluded(resource string) bool

GetDestinationNamespaces get destination namespaces without mapping

func (*MigPlan) IsVolumeMigrationDisabled

func (r *MigPlan) IsVolumeMigrationDisabled() bool

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) MarkReconciled

func (r *MigPlan) MarkReconciled()

func (*MigPlan) SetClosed

func (r *MigPlan) SetClosed()

Set the MigPlan Status to closed

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.

func (*MigPlan) UpdateRegistryService

func (r *MigPlan) UpdateRegistryService(service *kapi.Service, name string)

Update a Registry Service 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"`
}

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"`
	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

func (r *MigStorage) GetBackupStorageCredSecret(client k8sclient.Client) (*kapi.Secret, error)

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

func (r *MigStorage) GetVolumeSnapshotCredSecret(client k8sclient.Client) (*kapi.Secret, error)

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

func (in *PV) DeepCopy() *PV

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PV.

func (*PV) DeepCopyInto

func (in *PV) DeepCopyInto(out *PV)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PV) Update

func (r *PV) Update(pv PV)

Update the PV with another.

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"`
	HasReference bool                              `json:"hasReference,omitempty"`
}

PVC

func (*PVC) DeepCopy

func (in *PVC) DeepCopy() *PVC

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PVC.

func (*PVC) DeepCopyInto

func (in *PVC) DeepCopyInto(out *PVC)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PVC) GetSourceName

func (p PVC) GetSourceName() string

GetSourceName returns name of the source PVC

func (PVC) GetTargetName

func (p PVC) GetTargetName() string

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.

func (*PersistentVolumes) FindPVC

func (r *PersistentVolumes) FindPVC(namespace string, name string) *PVC

Find a PVC

func (*PersistentVolumes) FindPv

func (r *PersistentVolumes) FindPv(pv PV) *PV

Find a PV

func (*PersistentVolumes) ResetPvs

func (r *PersistentVolumes) ResetPvs()

Reset PVs collection.

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

func (in *Selection) DeepCopy() *Selection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selection.

func (*Selection) DeepCopyInto

func (in *Selection) DeepCopyInto(out *Selection)

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

func (in *Step) DeepCopy() *Step

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step.

func (*Step) DeepCopyInto

func (in *Step) DeepCopyInto(out *Step)

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"`
	AccessModes []kapi.PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
}

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

func (in *Supported) DeepCopy() *Supported

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Supported.

func (*Supported) DeepCopyInto

func (in *Supported) DeepCopyInto(out *Supported)

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

func (in *Timed) DeepCopy() *Timed

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timed.

func (*Timed) DeepCopyInto

func (in *Timed) DeepCopyInto(out *Timed)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Timed) MarkCompleted

func (r *Timed) MarkCompleted()

MarkCompleted mark as completed.

func (*Timed) MarkReset

func (r *Timed) MarkReset()

MarkReset mark as reset.

func (*Timed) MarkStarted

func (r *Timed) MarkStarted()

MarkStarted mark as started.

func (*Timed) MarkedCompleted

func (r *Timed) MarkedCompleted() bool

MarkedCompleted check if completed.

func (*Timed) MarkedStarted

func (r *Timed) MarkedStarted() bool

MarkedStarted check if started.

func (*Timed) Running

func (r *Timed) Running() bool

Running check if running

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 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

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

func (r *VolumeSnapshotConfig) GetCredSecret(client k8sclient.Client) (*kapi.Secret, error)

Get credentials secret.

func (*VolumeSnapshotConfig) GetProvider

func (r *VolumeSnapshotConfig) GetProvider(name string) pvdr.Provider

Get the cloud provider.

type Workload

type Workload struct {
	Name      string   `json:"name"`
	Resources []string `json:"resources,omitempty"`
}

Workload is a store for unhealthy resource and it's dependents

func (*Workload) DeepCopy

func (in *Workload) DeepCopy() *Workload

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.

func (*Workload) DeepCopyInto

func (in *Workload) DeepCopyInto(out *Workload)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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