directimagemigration

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: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Created                                         = ""
	Started                                         = "Started"
	Prepare                                         = "Prepare"
	CreateDestinationNamespaces                     = "CreateDestinationNamespaces"
	ListImageStreams                                = "ListImageStreams"
	CreateDirectImageStreamMigrations               = "CreateDirectImageStreamMigrations"
	WaitingForDirectImageStreamMigrationsToComplete = "WaitingForDirectImageStreamMigrationsToComplete"
	Completed                                       = "Completed"
	MigrationFailed                                 = "MigrationFailed"
)

Phases

View Source
const (
	InvalidSourceClusterRef               = "InvalidSourceClusterRef"
	InvalidDestinationClusterRef          = "InvalidDestinationClusterRef"
	InvalidDestinationCluster             = "InvalidDestinationCluster"
	SourceClusterNotReady                 = "SourceClusterNotReady"
	DestinationClusterNotReady            = "DestinationClusterNotReady"
	MissingSourceClusterRegistryPath      = "MissingSourceClusterRegistryPath"
	MissingDestinationClusterRegistryPath = "MissingDestinationClusterRegistryPath"
	NsListEmpty                           = "NamespaceListEmpty"
	NsNotFoundOnSourceCluster             = "NamespaceNotFoundOnSourceCluster"
)

Types

Variables

View Source
var FailedItinerary = Itinerary{
	Name: "Failed",
	Steps: []Step{
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
	},
}
View Source
var FastReQ = time.Duration(time.Millisecond * 100)

Requeue

View Source
var ImageItinerary = Itinerary{
	Name: "PVC",
	Steps: []Step{
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
		{/* contains filtered or unexported fields */},
	},
}
View Source
var NoReQ = time.Duration(0)
View Source
var PhaseDescriptions = map[string]string{
	Prepare:                           "Preparing for Direct Image Migration",
	Started:                           "Direct Image Migration started.",
	MigrationFailed:                   "Direct Image Migration failed.",
	CreateDestinationNamespaces:       "Creating target cluster namespaces for ImageStreams to be migrated into.",
	ListImageStreams:                  "Searching source cluster namespaces for ImageStreams to be migrated.",
	CreateDirectImageStreamMigrations: "Launching DirectImageStreamMigrations for all discovered ImageStreams.",
	WaitingForDirectImageStreamMigrationsToComplete: "Waiting for all DirectImageStreamMigrations to complete.",
	Completed: "Direct Image Migration completed.",
}

PhaseDescriptions are human readable strings that describe a phase

View Source
var PollReQ = time.Duration(time.Second * 3)

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new DirectImageMigration 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.

Types

type Itinerary

type Itinerary struct {
	Name  string
	Steps []Step
}

type ReconcileDirectImageMigration

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

ReconcileDirectImageMigration reconciles a DirectImageMigration object

func (*ReconcileDirectImageMigration) Reconcile

Reconcile reads that state of the cluster for a DirectImageMigration object and makes changes based on the state read and what is in the DirectImageMigration.Spec Automatically generate RBAC rules to allow the Controller to read and write Deployments +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get;update;patch +kubebuilder:rbac:groups=migration.openshift.io,resources=directimagemigrations,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=migration.openshift.io,resources=directimagemigrations/status,verbs=get;update;patch

type Step

type Step struct {
	// contains filtered or unexported fields
}

Step

type Task

type Task struct {
	Log       logr.Logger
	Client    k8sclient.Client
	Owner     *migapi.DirectImageMigration
	Phase     string
	Requeue   time.Duration
	Itinerary Itinerary
	Errors    []string

	Tracer        opentracing.Tracer
	ReconcileSpan opentracing.Span
}

A task that provides the complete migration workflow. Log - A controller's logger. Client - A controller's (local) client. Owner - A DirectImageMigration resource. Phase - The task phase. Requeue - The requeueAfter duration. 0 indicates no requeue. Itinerary - The phase itinerary. Errors - Migration errors. Failed - Task phase has failed.

func (*Task) Run

func (t *Task) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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