migplan

package
v0.0.0-...-25f5b1c Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 51 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MigPlan   = "migplan"
	CreatedBy = "CreatedBy"
)
View Source
const (
	Suspended                                  = "Suspended"
	InvalidSourceClusterRef                    = "InvalidSourceClusterRef"
	InvalidDestinationClusterRef               = "InvalidDestinationClusterRef"
	InvalidStorageRef                          = "InvalidStorageRef"
	SourceClusterNotReady                      = "SourceClusterNotReady"
	DestinationClusterNotReady                 = "DestinationClusterNotReady"
	ClusterVersionMismatch                     = "ClusterVersionMismatch"
	SourceClusterNoRegistryPath                = "SourceClusterNoRegistryPath"
	DestinationClusterNoRegistryPath           = "DestinationClusterNoRegistryPath"
	StorageNotReady                            = "StorageNotReady"
	StorageClassConversionUnavailable          = "StorageClassConversionUnavailable"
	NsListEmpty                                = "NamespaceListEmpty"
	InvalidDestinationCluster                  = "InvalidDestinationCluster"
	NsNotFoundOnSourceCluster                  = "NamespaceNotFoundOnSourceCluster"
	NsNotFoundOnDestinationCluster             = "NamespaceNotFoundOnDestinationCluster"
	NsLimitExceeded                            = "NamespaceLimitExceeded"
	NsLengthExceeded                           = "NamespaceLengthExceeded"
	NsNotDNSCompliant                          = "NamespaceNotDNSCompliant"
	NsHaveNodeSelectors                        = "NamespacesHaveNodeSelectors"
	DuplicateNsOnSourceCluster                 = "DuplicateNamespaceOnSourceCluster"
	DuplicateNsOnDestinationCluster            = "DuplicateNamespaceOnDestinationCluster"
	PodLimitExceeded                           = "PodLimitExceeded"
	SourceClusterProxySecretMisconfigured      = "SourceClusterProxySecretMisconfigured"
	DestinationClusterProxySecretMisconfigured = "DestinationClusterProxySecretMisconfigured"
	PlanConflict                               = "PlanConflict"
	PvNameConflict                             = "PvNameConflict"
	PvInvalidAction                            = "PvInvalidAction"
	PvNoSupportedAction                        = "PvNoSupportedAction"
	PvInvalidStorageClass                      = "PvInvalidStorageClass"
	PvInvalidAccessMode                        = "PvInvalidAccessMode"
	PvNoStorageClassSelection                  = "PvNoStorageClassSelection"
	PvWarnNoCephAvailable                      = "PvWarnNoCephAvailable"
	PvWarnAccessModeUnavailable                = "PvWarnAccessModeUnavailable"
	PvInvalidCopyMethod                        = "PvInvalidCopyMethod"
	PvCapacityAdjustmentRequired               = "PvCapacityAdjustmentRequired"
	PvUsageAnalysisFailed                      = "PvUsageAnalysisFailed"
	PvNoCopyMethodSelection                    = "PvNoCopyMethodSelection"
	PvWarnCopyMethodSnapshot                   = "PvWarnCopyMethodSnapshot"
	NfsNotAccessible                           = "NfsNotAccessible"
	NfsAccessCannotBeValidated                 = "NfsAccessCannotBeValidated"
	PvLimitExceeded                            = "PvLimitExceeded"
	StorageEnsured                             = "StorageEnsured"
	RegistriesEnsured                          = "RegistriesEnsured"
	RegistriesHealthy                          = "RegistriesHealthy"
	PvsDiscovered                              = "PvsDiscovered"
	Closed                                     = "Closed"
	SourcePodsNotHealthy                       = "SourcePodsNotHealthy"
	GVKsIncompatible                           = "GVKsIncompatible"
	InvalidHookRef                             = "InvalidHookRef"
	InvalidResourceList                        = "InvalidResourceList"
	HookNotReady                               = "HookNotReady"
	InvalidHookNSName                          = "InvalidHookNSName"
	InvalidHookSAName                          = "InvalidHookSAName"
	HookPhaseUnknown                           = "HookPhaseUnknown"
	HookPhaseDuplicate                         = "HookPhaseDuplicate"
	IntraClusterMigration                      = "IntraClusterMigration"
	KubeVirtNotInstalledSourceCluster          = "KubeVirtNotInstalledSourceCluster"
	KubeVirtVersionNotSupported                = "KubeVirtVersionNotSupported"
	KubeVirtStorageLiveMigrationNotEnabled     = "KubeVirtStorageLiveMigrationNotEnabled"
)

Types

View Source
const (
	Advisory = migapi.Advisory
	Critical = migapi.Critical
	Error    = migapi.Error
	Warn     = migapi.Warn
)

Categories

View Source
const (
	NotSet                 = "NotSet"
	NotFound               = "NotFound"
	KeyNotFound            = "KeyNotFound"
	NotDistinct            = "NotDistinct"
	LimitExceeded          = "LimitExceeded"
	LengthExceeded         = "LengthExceeded"
	NotDNSCompliant        = "NotDNSCompliant"
	NotDone                = "NotDone"
	Done                   = "Done"
	Conflict               = "Conflict"
	NotHealthy             = "NotHealthy"
	NodeSelectorsDetected  = "NodeSelectorsDetected"
	DuplicateNs            = "DuplicateNamespaces"
	ConflictingNamespaces  = "ConflictingNamespaces"
	ConflictingPermissions = "ConflictingPermissions"
	NotSupported           = "NotSupported"
)

Reasons

View Source
const (
	KubeVirtNotInstalledSourceClusterMessage      = "KubeVirt is not installed on the source cluster"
	KubeVirtVersionNotSupportedMessage            = "KubeVirt version does not support storage live migration, Virtual Machines will be stopped instead"
	KubeVirtStorageLiveMigrationNotEnabledMessage = "KubeVirt storage live migration is not enabled, Virtual Machines will be stopped instead"
)

Messages

View Source
const (
	True  = migapi.True
	False = migapi.False
)

Statuses

View Source
const (
	VolumesUpdateStrategy = "VolumesUpdateStrategy"
	VolumeMigrationConfig = "VolumeMigration"
	VMLiveUpdateFeatures  = "VMLiveUpdateFeatures"
)

Valid kubevirt feature gates

View Source
const (
	NfsPort = "2049"
)

NFS validation

Variables

View Source
var (

	// Application settings.
	Settings = &settings.Settings
)

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new MigPlan Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

func MigrationRequests

func MigrationRequests(a client.Object, inNamespace string) []reconcile.Request

Types

type Claims

type Claims []migapi.PVC

type ClusterPredicate

type ClusterPredicate struct {
	predicate.Funcs
	Namespace string
}

func (ClusterPredicate) Create

func (r ClusterPredicate) Create(e event.CreateEvent) bool

func (ClusterPredicate) Update

func (r ClusterPredicate) Update(e event.UpdateEvent) bool

type HookPredicate

type HookPredicate struct {
	predicate.Funcs
	Namespace string
}

func (HookPredicate) Create

func (r HookPredicate) Create(e event.CreateEvent) bool

func (HookPredicate) Update

func (r HookPredicate) Update(e event.UpdateEvent) bool

type MigrationPredicate

type MigrationPredicate struct {
	predicate.Funcs
	Namespace string
}

func (MigrationPredicate) Create

func (MigrationPredicate) Update

type NfsValidation

type NfsValidation struct {
	Plan *migapi.MigPlan
	// contains filtered or unexported fields
}

NFS validation.

Plan - A migration plan.
cluster - The destination cluster.
client - A client for the destination.
restCfg - A rest configuration for the destination.
pod - The pod to be used to execute commands.

func (*NfsValidation) Run

func (r *NfsValidation) Run(client k8sclient.Client) error

Validate the NFS servers referenced by PVs have network accessible on the destination cluster. PVs referencing inaccessible NFS servers will be updated to not support the `move` action.

type PlanPredicate

type PlanPredicate struct {
	predicate.Funcs
	Namespace string
}

func (PlanPredicate) Create

func (r PlanPredicate) Create(e event.CreateEvent) bool

func (PlanPredicate) Delete

func (r PlanPredicate) Delete(e event.DeleteEvent) bool

func (PlanPredicate) Update

func (r PlanPredicate) Update(e event.UpdateEvent) bool

type PlanStorage

type PlanStorage struct {
	k8sclient.Client
	// contains filtered or unexported fields
}

PlanStorage Client: The controller client. targetClient: A client for a cluster. plan: A plan resource. storage: A storage resource.

func (*PlanStorage) BuildBSL

func (r *PlanStorage) BuildBSL() *velero.BackupStorageLocation

Build BSL.

func (*PlanStorage) BuildBSLCloudSecret

func (r *PlanStorage) BuildBSLCloudSecret() (*kapi.Secret, error)

Build BSL cloud secret.

func (*PlanStorage) BuildVSL

func (r *PlanStorage) BuildVSL() *velero.VolumeSnapshotLocation

Build VSL.

func (*PlanStorage) BuildVSLCloudSecret

func (r *PlanStorage) BuildVSLCloudSecret() (*kapi.Secret, error)

Build VSL cloud secret.

func (*PlanStorage) UpdateBSL

func (r *PlanStorage) UpdateBSL(bsl *velero.BackupStorageLocation)

Update BSL.

func (*PlanStorage) UpdateBSLCloudSecret

func (r *PlanStorage) UpdateBSLCloudSecret(cloudSecret *kapi.Secret) error

Update backup cloud-secret.

func (*PlanStorage) UpdateVSL

func (r *PlanStorage) UpdateVSL(vsl *velero.VolumeSnapshotLocation)

Update VSL.

func (*PlanStorage) UpdateVSLCloudSecret

func (r *PlanStorage) UpdateVSLCloudSecret(cloudSecret *kapi.Secret) error

Update snapshot cloud-secret.

type ReconcileMigPlan

type ReconcileMigPlan struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

ReconcileMigPlan reconciles a MigPlan object

func (*ReconcileMigPlan) Reconcile

func (r *ReconcileMigPlan) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

type StoragePredicate

type StoragePredicate struct {
	predicate.Funcs
	Namespace string
}

func (StoragePredicate) Create

func (r StoragePredicate) Create(e event.CreateEvent) bool

func (StoragePredicate) Update

func (r StoragePredicate) Update(e event.UpdateEvent) bool

Jump to

Keyboard shortcuts

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