v1alpha1

package
v0.0.0-...-a5e3609 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 43 Imported by: 0

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 (
	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"
)

Labels

View Source
const (
	ClusterConfigMapName = "migration-cluster-config"
	RegistryImageKey     = "REGISTRY_IMAGE"
	StagePodImageKey     = "STAGE_IMAGE"
)

migration-cluster-config configmap

View Source
const (
	HookPhaseLabel       = "phase"
	HookOwnerLabel       = "owner"
	PreBackupHookPhase   = "PreBackup"
	PostBackupHookPhase  = "PostBackup"
	PreRestoreHookPhase  = "PreRestore"
	PostRestoreHookPhase = "PostRestore"
)
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 (
	MigrationRegistryLabel = "migration.openshift.io/migration-registry"
)

Registry labels for controller-created migration registry resources

View Source
const (
	PlanIndexField = "planRef"
)

Cache Indexes.

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

HasCompleted gets whether a DirectImageMigration has completed and a list of errors, if any

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"`
	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 {
	ImageStreams []ImageStreamListItem `json:"imageStreams,omitempty"`
	Conditions
	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"`
}

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) 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) 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"`
	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
	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) 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=".spec.podRef.name" +kubebuilder:printcolumn:name="Pod Namespace",type=string,JSONPath=".spec.podRef.namespace" +kubebuilder:printcolumn:name="Progress Percent",type=string,JSONPath=".status.lastObservedProgressPercent" +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) 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"`
}

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
	PodPhase                    kapi.PodPhase `json:"phase,omitempty"`
	LogMessage                  string        `json:"logMessage,omitempty"`
	ObservedDigest              string        `json:"observedDigest,omitempty"`
	LastObservedProgressPercent string        `json:"lastObservedProgressPercent,omitempty"`
	LastObservedTransferRate    string        `json:"lastObservedTransferRate,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.

type DirectVolumeMigrationSpec

type DirectVolumeMigrationSpec struct {
	SrcMigClusterRef            *kapi.ObjectReference `json:"srcMigClusterRef,omitempty"`
	DestMigClusterRef           *kapi.ObjectReference `json:"destMigClusterRef,omitempty"`
	PersistentVolumeClaims      []PVCToMigrate        `json:"persistentVolumeClaims,omitempty"`
	CreateDestinationNamespaces bool                  `json:"createDestinationNamespaces,omitempty"`
	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
	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"`
}

DirectVolumeMigrationStatus defines the observed state of DirectVolumeMigration

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.

type ImageStreamListItem

type ImageStreamListItem struct {
	Namespace     string `json:"namespace,omitempty"`
	Name          string `json:"name,omitempty"`
	DestNamespace string `json:"destNamespace,omitempty"`
	NotFound      bool   `json:"notFound,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"`
	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 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"`
	AnalyzePVCapacity   bool                  `json:"analyzePVCapacity"`
	AnalyzeImageCount   bool                  `json:"analyzeImageCount"`
	AnalyzeK8SResources bool                  `json:"analyzeK8SResources"`
	ListImages          bool                  `json:"listImages,omitempty"`
	ListImagesLimit     int                   `json:"listImagesLimit,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
	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 get a local or remote client using a MigCluster and an existing client

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

func (m *MigCluster) GetRegistryImage(c k8sclient.Client) (string, error)

GetRegistryImage gets a MigCluster specific registry image from ConfigMap

func (*MigCluster) GetRegistryPath

func (m *MigCluster) GetRegistryPath(c k8sclient.Client) (string, error)

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) 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 {
	IsHostCluster           bool                  `json:"isHostCluster"`
	URL                     string                `json:"url,omitempty"`
	ServiceAccountSecretRef *kapi.ObjectReference `json:"serviceAccountSecretRef,omitempty"`
	CABundle                []byte                `json:"caBundle,omitempty"`
	AzureResourceGroup      string                `json:"azureResourceGroup,omitempty"`
	Insecure                bool                  `json:"insecure,omitempty"`
	RestartRestic           *bool                 `json:"restartRestic,omitempty"`
	Refresh                 bool                  `json:"refresh,omitempty"`
	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
	ObservedDigest string `json:"observedDigest,omitempty"`
	RegistryPath   string `json:"registryPath,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 {
	Custom                bool   `json:"custom"`
	Image                 string `json:"image"`
	Playbook              string `json:"playbook,omitempty"`
	TargetCluster         string `json:"targetCluster"`
	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
	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 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) 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"`
	Stage           bool                  `json:"stage"`
	QuiescePods     bool                  `json:"quiescePods,omitempty"`
	KeepAnnotations bool                  `json:"keepAnnotations,omitempty"`
	Verify          bool                  `json:"verify,omitempty"`
	Canceled        bool                  `json:"canceled,omitempty"`
	Rollback        bool                  `json:"rollback,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
	UnhealthyResources
	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) *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) GetName

func (r *MigPlan) GetName() string

func (*MigPlan) GetNamespace

func (r *MigPlan) GetNamespace() string

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

func (r *MigPlan) GetRegistryProxySecret(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) 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) IsResourceExcluded

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

GetDestinationNamespaces get destination namespaces without mapping

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)

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"`
	Phase              string                `json:"phase"`
	ExecutionNamespace string                `json:"executionNamespace"`
	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 {
	PersistentVolumes       `json:",inline"`
	Namespaces              []string              `json:"namespaces,omitempty"`
	SrcMigClusterRef        *kapi.ObjectReference `json:"srcMigClusterRef,omitempty"`
	DestMigClusterRef       *kapi.ObjectReference `json:"destMigClusterRef,omitempty"`
	MigStorageRef           *kapi.ObjectReference `json:"migStorageRef,omitempty"`
	Closed                  bool                  `json:"closed,omitempty"`
	Hooks                   []MigPlanHook         `json:"hooks,omitempty"`
	Refresh                 bool                  `json:"refresh,omitempty"`
	IndirectImageMigration  bool                  `json:"indirectImageMigration,omitempty"`
	IndirectVolumeMigration bool                  `json:"indirectVolumeMigration,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
	Conditions
	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 MigResource

type MigResource interface {
	// Get a map containing the correlation label.
	// Correlation labels are used to track any resource
	// created by the controller.  The includes the application
	// (global) label and the resource label.
	GetCorrelationLabels() map[string]string
	// Get the resource correlation label.
	// The label is used to track resources created by the
	// controller that is related to this resource.
	GetCorrelationLabel() (string, string)
	// Get the resource namespace.
	GetNamespace() string
	// Get the resource name.
	GetName() string
	// Mark the resource as having been reconciled.
	// Updates the ObservedDigest.
	// Update the touch annotation. This ensures that the resource
	// is changed on every reconcile. This needed to support
	// remote watch event propagation on OCP4.
	MarkReconciled()
	// Get whether the resource has been reconciled.
	HasReconciled() bool
}

Migration application CR.

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 {
	BackupStorageProvider  string `json:"backupStorageProvider"`
	BackupStorageConfig    `json:"backupStorageConfig"`
	VolumeSnapshotProvider string `json:"volumeSnapshotProvider,omitempty"`
	VolumeSnapshotConfig   `json:"volumeSnapshotConfig,omitempty"`
	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
	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 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:"-"`
	// 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.

type PVCToMigrate

type PVCToMigrate struct {
	*kapi.ObjectReference `json:",inline"`
	TargetStorageClass    string                            `json:"targetStorageClass"`
	TargetAccessModes     []kapi.PersistentVolumeAccessMode `json:"targetAccessModes,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) 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"`
	LastObservedProgressPercent string `json:"lastObservedProgressPercent,omitempty"`
	LastObservedTransferRate    string `json:"lastObservedTransferRate,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 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

	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