controllers

package
Version: v0.0.0-...-04a3b44 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrecacheStateNotStarted       = "NotStarted"
	PrecacheStatePreparingToStart = "PreparingToStart"
	PrecacheStateStarting         = "Starting"
	PrecacheStateActive           = "Active"
	PrecacheStateSucceeded        = "Succeeded"
	PrecacheStateTimeout          = "PrecacheTimeout"
	PrecacheStateError            = "UnrecoverableError"
)

Pre-cache states

View Source
const (
	NoNsView                   = "NoNsView"
	NoNsFoundOnSpoke           = "NoNsFoundOnSpoke"
	NsFoundOnSpoke             = "NsFoundOnSpoke"
	NoJobView                  = "NoJobView"
	NoJobFoundOnSpoke          = "NoJobFoundOnSpoke"
	JobViewExists              = "JobViewExists"
	DependenciesViewNotPresent = "DependenciesViewNotPresent"
	DependenciesNotPresent     = "DependenciesNotPresent"
	JobDeadline                = "JobDeadline"
	JobSucceeded               = "JobSucceeded"
	JobActive                  = "JobActive"
	JobBackoffLimitExceeded    = "JobBackoffLimitExceeded"
	UnforeseenCondition        = "UnforeseenCondition"
)

Pre-cache resources conditions

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterGroupUpgradeReconciler

type ClusterGroupUpgradeReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

ClusterGroupUpgradeReconciler reconciles a ClusterGroupUpgrade object

func (*ClusterGroupUpgradeReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ClusterGroupUpgrade object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*ClusterGroupUpgradeReconciler) SetupWithManager

func (r *ClusterGroupUpgradeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ManagedClusterForCguReconciler

type ManagedClusterForCguReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

ManagedClusterForCguReconciler reconciles a ManagedCluster object to auto create the ClusterGroupUpgrade

func (*ManagedClusterForCguReconciler) Reconcile

Reconcile the managed cluster auto create ClusterGroupUpgrade - Controller watches for create event of managed cluster object. Reconciliation

is triggered when a new managed cluster is created

- When a new managed cluster is created, create ClusterGroupUpgrade CR for the

cluster only when it's ready and its child policies are available

- As created ClusterGroupUpgrade has ownReference set to its managed cluster,

when the managed cluster is deleted, the ClusterGroupUpgrade will be auto-deleted

Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*ManagedClusterForCguReconciler) SetupWithManager

func (r *ManagedClusterForCguReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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