controller

package
v0.0.0-...-342c6e2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: EPL-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FinalizerName is the name of the finalizer put on the Che Cluster resources by the controller. Public for testing purposes.
	FinalizerName = "checluster.che.eclipse.org"
)

Variables

This section is empty.

Functions

func GetCurrentCheClusterInstances

func GetCurrentCheClusterInstances() map[client.ObjectKey]v2alpha1.CheCluster

GetCurrentCheClusterInstances returns a map of all che clusters (keyed by their namespaced name) the che cluster controller currently knows of. This returns any meaningful data only after reconciliation has taken place.

If this method is called from another controller, it effectively couples that controller with the che manager controller. Such controller will therefore have to run in the same process as the che manager controller. On the other hand, using this method, and somehow tolerating its eventual consistency, makes the other controller more efficient such that it doesn't have to find the che managers in the cluster (which is what che manager reconciler is doing).

If need be, this method can be replaced by a simply calling client.List to get all the che managers in the cluster.

Types

type CheClusterReconciler

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

func New

New returns a new instance of the Che manager reconciler. This is mainly useful for testing because it doesn't set up any watches in the cluster, etc. For that use SetupWithManager.

func (*CheClusterReconciler) Reconcile

func (r *CheClusterReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*CheClusterReconciler) SetupWithManager

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

Jump to

Keyboard shortcuts

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