directimagestreammigration

package
v0.0.0-...-ec8378c Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Created            = ""
	Started            = "Started"
	Prepare            = "Prepare"
	MigrateImageStream = "MigrateImageStream"
	Completed          = "Completed"
	MigrationFailed    = "MigrationFailed"
)

Phases

View Source
const (
	InvalidSourceClusterRef               = "InvalidSourceClusterRef"
	InvalidDestinationClusterRef          = "InvalidDestinationClusterRef"
	InvalidDestinationCluster             = "InvalidDestinationCluster"
	MissingSourceClusterRegistryPath      = "MissingSourceClusterRegistryPath"
	MissingDestinationClusterRegistryPath = "MissingDestinationClusterRegistryPath"
	SourceClusterNotReady                 = "SourceClusterNotReady"
	DestinationClusterNotReady            = "DestinationClusterNotReady"
	InvalidImageStreamRef                 = "InvalidImageStreamRef"
	InvalidImageStream                    = "InvalidImageStream"
	NsNotFoundOnDestinationCluster        = "NamespaceNotFoundOnDestinationCluster"
)

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 */},
	},
}
View Source
var NoReQ = time.Duration(0)
View Source
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

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

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new DirectImageStreamMigration 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 ReconcileDirectImageStreamMigration

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

ReconcileDirectImageStreamMigration reconciles a DirectImageStreamMigration object

func (*ReconcileDirectImageStreamMigration) Reconcile

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 Step

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

Step

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.

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