Documentation ¶
Index ¶
Constants ¶
const ( Created = "" Started = "Started" Prepare = "Prepare" MigrateImageStream = "MigrateImageStream" Completed = "Completed" MigrationFailed = "MigrationFailed" )
Phases
const ( InvalidSourceClusterRef = "InvalidSourceClusterRef" InvalidDestinationClusterRef = "InvalidDestinationClusterRef" InvalidDestinationCluster = "InvalidDestinationCluster" MissingSourceClusterRegistryPath = "MissingSourceClusterRegistryPath" MissingDestinationClusterRegistryPath = "MissingDestinationClusterRegistryPath" SourceClusterNotReady = "SourceClusterNotReady" DestinationClusterNotReady = "DestinationClusterNotReady" InvalidImageStreamRef = "InvalidImageStreamRef" InvalidImageStream = "InvalidImageStream" NsNotFoundOnDestinationCluster = "NamespaceNotFoundOnDestinationCluster" )
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 */}, }, }
var NoReQ = time.Duration(0)
var PhaseDescriptions = map[string]string{
Created: "DirectImageStreamMigration created.",
Started: "DirectImageStreamMigration started.",
Prepare: "Preparing for DirectImageStreamMigration.",
MigrateImageStream: "Migrating internal images found in ImageStreams from source to target cluster.",
MigrationFailed: "Migration failed.",
Completed: "Migration completed.",
}
PhaseDescriptions are human readable strings that describe a phase
var PollReQ = time.Duration(time.Second * 3)
Functions ¶
Types ¶
type ReconcileDirectImageStreamMigration ¶
type ReconcileDirectImageStreamMigration struct { client.Client record.EventRecorder // contains filtered or unexported fields }
ReconcileDirectImageStreamMigration reconciles a DirectImageStreamMigration object
func (*ReconcileDirectImageStreamMigration) Reconcile ¶
func (r *ReconcileDirectImageStreamMigration) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the cluster for a DirectImageStreamMigration object and makes changes based on the state read and what is in the DirectImageStreamMigration.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=directimagestreammigrations,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=migration.openshift.io,resources=directimagestreammigrations/status,verbs=get;update;patch
type Task ¶
type Task struct { Log logr.Logger Client k8sclient.Client Owner *migapi.DirectImageStreamMigration 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.