Documentation ¶
Index ¶
- Constants
- type ClusterDefConfig
- type ClusterDefReconciler
- func (r *ClusterDefReconciler) MapClusterToClusterDef(cluster client.Object) []reconcile.Request
- func (r *ClusterDefReconciler) MapObjectToClusterDef(object client.Object) []reconcile.Request
- func (r *ClusterDefReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ClusterDefReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ClusterDefReconciler) UpdateStatus(nsName types.NamespacedName, phase gitopsv1.ClusterDefState, cpVersion string, ...) error
Constants ¶
const CAPI_VERSION = "v1beta1"
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