Documentation
¶
Overview ¶
Package migration provides implementation for CR migration from Giant Swarm flavor to upstream compatible CAPI.
Index ¶
Constants ¶
View Source
const (
EncryptionSecret = "EncryptionSecret"
)
Variables ¶
This section is empty.
Functions ¶
func IsAzureNotFound ¶
IsAzureNotFound detects an azure API 404 error.
Types ¶
type AWSMigrationConfig ¶
type AWSMigrationConfig struct {
// Migration configuration + dependencies such as k8s client.
AWSCredentials AWSConfig
CtrlClient ctrl.Client
Logger micrologger.Logger
TenantCluster tenantcluster.Interface
}
type AzureMigrationConfig ¶
type AzureMigrationConfig struct {
// Migration configuration + dependencies such as k8s client.
CtrlClient ctrl.Client
Logger micrologger.Logger
TenantCluster tenantcluster.Interface
}
type Migrator ¶
type Migrator interface {
// Cleanup performs cleanup operations after migration has been completed.
Cleanup(ctx context.Context) error
// IsMigrated performs check to see if given cluster has been already
// migrated.
IsMigrated(ctx context.Context) (bool, error)
// IsMigrating performs check to see if given cluster has migration
// triggered already.
IsMigrating(ctx context.Context) (bool, error)
// Prepare executes preparatory migration actions such as transforming
// existing CRs into upstream compatible format and creating missing CRs.
Prepare(ctx context.Context) error
// TriggerMigration performs final execution which shifts reconciliation to
// upstream controllers.
TriggerMigration(ctx context.Context) error
}
type MigratorFactory ¶
type MigratorFactory interface {
// Construct new Migrator for given cluster.
NewMigrator(cluster *v1alpha3.Cluster) (Migrator, error)
}
func NewAWSMigratorFactory ¶
func NewAWSMigratorFactory(cfg AWSMigrationConfig) (MigratorFactory, error)
func NewAzureMigratorFactory ¶
func NewAzureMigratorFactory(cfg AzureMigrationConfig) (MigratorFactory, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.