controller

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitClusterReconciler

func InitClusterReconciler() func(ctrl.Manager) error

InitClusterReconciler returns a registrator for new controller instance with the default logger

func InitClusterReconcilerWithLogger

func InitClusterReconcilerWithLogger(l logr.Logger) func(ctrl.Manager) error

InitClusterReconcilerWithLogger returns a registrator for new controller instance with provided logger

Types

type ClusterReconciler

type ClusterReconciler struct {
	client.Client
	Log     logr.Logger
	Scheme  *runtime.Scheme
	Actions []actor.Actor
}

ClusterReconciler reconciles a CrdbCluster object

func (*ClusterReconciler) Reconcile

Reconcile is the reconciliation loop entry point for cluster CRDs. It fetches the current cluster resources and uses its state to interact with the world via a set of actions implemented by `Actor`s (i.e. init cluster, create a statefulset). Each action can result in:

  • a short requeue (5 seconds)
  • a long requeue (5 minutes)
  • cancel the loop and wait for another event
  • if no other errors occurred continue to the next action

func (*ClusterReconciler) SetupWithManager

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

SetupWithManager registers the controller with the controller.Manager from controller-runtime

Jump to

Keyboard shortcuts

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