Documentation ¶
Index ¶
Constants ¶
const ( Created = "" Started = "Started" Prepare = "Prepare" CreateDestinationNamespaces = "CreateDestinationNamespaces" ListImageStreams = "ListImageStreams" CreateDirectImageStreamMigrations = "CreateDirectImageStreamMigrations" WaitingForDirectImageStreamMigrationsToComplete = "WaitingForDirectImageStreamMigrationsToComplete" Completed = "Completed" MigrationFailed = "MigrationFailed" )
Phases
const ( InvalidSourceClusterRef = "InvalidSourceClusterRef" InvalidDestinationClusterRef = "InvalidDestinationClusterRef" InvalidDestinationCluster = "InvalidDestinationCluster" SourceClusterNotReady = "SourceClusterNotReady" DestinationClusterNotReady = "DestinationClusterNotReady" MissingSourceClusterRegistryPath = "MissingSourceClusterRegistryPath" MissingDestinationClusterRegistryPath = "MissingDestinationClusterRegistryPath" NsListEmpty = "NamespaceListEmpty" NsNotFoundOnSourceCluster = "NamespaceNotFoundOnSourceCluster" )
Types
Variables ¶
var FailedItinerary = Itinerary{ Name: "Failed", Steps: []Step{ {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, }, }
var FastReQ = time.Duration(time.Millisecond * 100)
Requeue
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 */}, }, }
var NoReQ = time.Duration(0)
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
var PollReQ = time.Duration(time.Second * 3)
Functions ¶
Types ¶
type ReconcileDirectImageMigration ¶
type ReconcileDirectImageMigration struct { client.Client record.EventRecorder // contains filtered or unexported fields }
ReconcileDirectImageMigration reconciles a DirectImageMigration object
func (*ReconcileDirectImageMigration) Reconcile ¶
func (r *ReconcileDirectImageMigration) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
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 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.