controllers

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterPredicates

func ClusterPredicates(logger logr.Logger) predicate.Funcs

ClusterPredicates predicates for v1Cluster. ClusterFeatureReconciler watches v1Cluster events and react to those by reconciling itself based on following predicates

func DeployWorkloadRoles

func DeployWorkloadRoles(ctx context.Context, c client.Client,
	clusterNamespace, clusterName, applicant, _ string,
	logger logr.Logger) error

func MachinePredicates

func MachinePredicates(logger logr.Logger) predicate.Funcs

MachinePredicates predicates for v1Machine. ClusterFeatureReconciler watches v1Machine events and react to those by reconciling itself based on following predicates

func WorkloadRolePredicates

func WorkloadRolePredicates(logger logr.Logger) predicate.Funcs

WorkloadRolePredicates predicates for WorkloadRole. ClusterSummaryReconciler watches WorkloadRole events and react to those by reconciling itself based on following predicates

Types

type ClusterFeatureReconciler

type ClusterFeatureReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	Log               logr.Logger
	Mux               sync.Mutex                         // use a Mutex to update Map as MaxConcurrentReconciles is higher than one
	ClusterMap        map[string]*Set                    // key: CAPI Cluster namespace/name; value: set of all ClusterFeatures matching the Cluster
	ClusterFeatureMap map[string]*Set                    // key: ClusterFeature name; value: set of CAPI Clusters matched
	ClusterFeatures   map[string]configv1alpha1.Selector // key: ClusterFeature name; value ClusterFeature Selector

}

ClusterFeatureReconciler reconciles a ClusterFeature object

func (*ClusterFeatureReconciler) Reconcile

func (r *ClusterFeatureReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*ClusterFeatureReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ClusterSummaryReconciler

type ClusterSummaryReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	Log               logr.Logger
	Deployer          deployer.DeployerInterface
	Mux               sync.Mutex      // use a Mutex to update Map as MaxConcurrentReconciles is higher than one
	WorkloadRoleMap   map[string]*Set // key: WorkloadRole name; value: set of all ClusterSummaries referencing the WorkloadRole
	ClusterSummaryMap map[string]*Set // key: ClusterSummary name; value: set of WorkloadRoles referenced

}

ClusterSummaryReconciler reconciles a ClusterSummary object

func (*ClusterSummaryReconciler) Reconcile

func (r *ClusterSummaryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*ClusterSummaryReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type Set

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

Jump to

Keyboard shortcuts

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