migcluster

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

Documentation

Index

Constants

View Source
const (
	InvalidURL                     = "InvalidURL"
	InvalidSaSecretRef             = "InvalidSaSecretRef"
	InvalidSaToken                 = "InvalidSaToken"
	InvalidRegistryRoute           = "InvalidRegistryRoute"
	TestConnectFailed              = "TestConnectFailed"
	SaTokenNotPrivileged           = "SaTokenNotPrivileged"
	OperatorVersionMismatch        = "OperatorVersionMismatch"
	ClusterOperatorVersionNotFound = "ClusterOperatorVersionNotFound"
)

Types

View Source
const (
	Critical = migapi.Critical
	Warn     = migapi.Warn
)

Categories

View Source
const (
	NotSet             = "NotSet"
	NotFound           = "NotFound"
	ConnectFailed      = "ConnectFailed"
	Malformed          = "Malformed"
	RouteTestFailed    = "RouteTestFailed"
	InvalidScheme      = "InvalidScheme"
	Unauthorized       = "Unauthorized"
	VersionCheckFailed = "VersionCheckFailed"
	VersionNotFound    = "VersionNotFound"
)

Reasons

View Source
const (
	True  = migapi.True
	False = migapi.False
)

Statuses

Variables

View Source
var Settings = &settings.Settings

Functions

func Add

func Add(mgr manager.Manager) error

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

func IsRemoteWatchConsistent

func IsRemoteWatchConsistent(nsName types.NamespacedName, config *rest.Config) bool

IsRemoteWatchConsistent checks whether remote watch in-memory is consistent with given new config

func StartRemoteWatch

func StartRemoteWatch(r *ReconcileMigCluster, config remote.ManagerConfig) error

StartRemoteWatch will configure a new RemoteWatcher manager that provides a cached client

func StopRemoteWatch

func StopRemoteWatch(nsName types.NamespacedName)

StopRemoteWatch will run the remote manager stopFunc and delete it from the remote watch map.

Types

type ClusterPredicate

type ClusterPredicate struct {
	predicate.Funcs
	Namespace string
}

func (ClusterPredicate) Create

func (r ClusterPredicate) Create(e event.CreateEvent) bool

func (ClusterPredicate) Delete

func (r ClusterPredicate) Delete(e event.DeleteEvent) bool

func (ClusterPredicate) Update

func (r ClusterPredicate) Update(e event.UpdateEvent) bool

type ReconcileMigCluster

type ReconcileMigCluster struct {
	k8sclient.Client
	record.EventRecorder

	Controller controller.Controller
	// contains filtered or unexported fields
}

ReconcileMigCluster reconciles a MigCluster object

func (*ReconcileMigCluster) Reconcile

func (r *ReconcileMigCluster) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

type RemoteClusterSource

type RemoteClusterSource struct {
	Client   client.Client
	Interval time.Duration

	Namespace string
	// contains filtered or unexported fields
}

RemoteClusterSource is a `watch` source used to checkup on the connectivity of remote clusters.

Client - A controller-runtime client.
Interval - The connection test interval

func (*RemoteClusterSource) Start

Start the source.

Jump to

Keyboard shortcuts

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