controllers

package
v0.7.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CAPI_VERSION = "v1beta1"
View Source
const MilliResyncPeriod = 3000

MilliResyncPeriod is the duration between two synchronization attempt of a given resource

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterDefConfig

type ClusterDefConfig struct {
	ArgoCDNamespace   string
	ClusterFileName   string
	InfraNamespace    string
	PluginName        string
	MilliResyncPeriod int
}

ClusterDefConfig contains global parameters of the ClusterDef operator. Typical operators are the location and credentials of the snapshot repository, location of base cluster models and infrastructure parameters.

func MakeConfig added in v0.7.0

func MakeConfig() *ClusterDefConfig

MakeConfig initializes the global configuration of the controller

type ClusterDefReconciler

type ClusterDefReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
	Config *ClusterDefConfig
}

ClusterDefReconciler reconciles a ClusterDef object

func (*ClusterDefReconciler) MapClusterToClusterDef added in v0.7.0

func (r *ClusterDefReconciler) MapClusterToClusterDef(cluster client.Object) []reconcile.Request

MapObjectToClusterDef associates the ClusterDef that triggered the creation of the cluster given as object

func (*ClusterDefReconciler) MapObjectToClusterDef added in v0.7.2

func (r *ClusterDefReconciler) MapObjectToClusterDef(object client.Object) []reconcile.Request

MapObjectToClusterDef associates the ClusterDef that triggered the creation of the cluster that owns this object.

func (*ClusterDefReconciler) Reconcile

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

Reconcile implements the core logic

func (*ClusterDefReconciler) SetupWithManager

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

SetupWithManager registers the controller for ClusterDef

func (*ClusterDefReconciler) UpdateStatus added in v0.7.2

func (r *ClusterDefReconciler) UpdateStatus(
	nsName types.NamespacedName,
	phase gitopsv1.ClusterDefState,
	cpVersion string,
	versions []string,
) error

UpdateConditions method update the status of a clusterDef resource

Jump to

Keyboard shortcuts

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