devworkspace

package
v0.0.0-...-f7e4497 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: EPL-2.0 Imports: 23 Imported by: 0

README

= Devworkspace Che controller

This is an import of originally standalone Devworkspace Che operator.
As such many things, that could be shared or reused with/from the rest
of the che-operator codebase, aren't. 

This situation will hopefully improve over time as we integrate the two
codebases more and more.

In particular, the `controller/devworkspace/sync` subpackage is more 
or less identical to `deploy/sync` and should be replaced by `deploy/sync`
after a careful inspection, if possible.

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 CleanCheClusterInstancesForTest

func CleanCheClusterInstancesForTest()

CleanCheClusterInstancesForTest is a helper function for test code in other packages that needs to re-initialize the state of the checluster instance cache.

func GetCurrentCheClusterInstances

func GetCurrentCheClusterInstances() map[client.ObjectKey]chev2.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(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*CheClusterReconciler) SetupWithManager

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

Directories

Path Synopsis
Package solver contains the implementation of the "devworkspace routing solver" which provides che-specific logic to the otherwise generic dev workspace routing controller.
Package solver contains the implementation of the "devworkspace routing solver" which provides che-specific logic to the otherwise generic dev workspace routing controller.

Jump to

Keyboard shortcuts

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