controllers

package
v0.0.0-...-7ec0729 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manageable

type Manageable interface {
	SetupWithManager(mgr ctrl.Manager) error
}

Manageable all types that conform to this interface can be setup with a controller-runtime manager.

type Reconciler

type Reconciler interface {
	Manageable
	SetRequeueTimeout(timeout time.Duration)
}

Reconciler represents a generic interface for all Reconciler objects in watcher

type ReconcilerBase

type ReconcilerBase struct {
	Client         client.Client
	Kclient        kubernetes.Interface
	Scheme         *runtime.Scheme
	RequeueTimeout time.Duration
}

ReconcilerBase provides a common set of clients scheme and loggers for all reconcilers.

func NewReconcilerBase

func NewReconcilerBase(
	mgr ctrl.Manager, kclient kubernetes.Interface,
) ReconcilerBase

NewReconcilerBase constructs a ReconcilerBase given a manager and Kclient.

func (*ReconcilerBase) GetLogger

func (r *ReconcilerBase) GetLogger(ctx context.Context) logr.Logger

GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields

func (*ReconcilerBase) SetRequeueTimeout

func (r *ReconcilerBase) SetRequeueTimeout(timeout time.Duration)

SetRequeueTimeout overrides the default RequeueTimeout of the Reconciler

type Reconcilers

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

Reconcilers holds all the Reconciler objects of the watcher-operator to allow generic management of them.

func NewReconcilers

func NewReconcilers(mgr ctrl.Manager, kclient *kubernetes.Clientset) *Reconcilers

NewReconcilers constructs all watcher Reconciler objects

func (*Reconcilers) OverrideRequeueTimeout

func (r *Reconcilers) OverrideRequeueTimeout(timeout time.Duration)

OverrideRequeueTimeout overrides the default RequeueTimeout of our reconcilers

func (*Reconcilers) Setup

func (r *Reconcilers) Setup(mgr ctrl.Manager, setupLog logr.Logger) error

Setup starts the reconcilers by connecting them to the Manager

type WatcherAPIReconciler

type WatcherAPIReconciler struct {
	ReconcilerBase
}

WatcherAPIReconciler reconciles a WatcherAPI object

func (*WatcherAPIReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the WatcherAPI object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.3/pkg/reconcile

func (*WatcherAPIReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type WatcherApplierReconciler

type WatcherApplierReconciler struct {
	ReconcilerBase
}

WatcherApplierReconciler reconciles a WatcherApplier object

func (*WatcherApplierReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the WatcherApplier object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*WatcherApplierReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type WatcherDecisionEngineReconciler

type WatcherDecisionEngineReconciler struct {
	ReconcilerBase
}

WatcherDecisionEngineReconciler reconciles a WatcherDecisionEngine object

func (*WatcherDecisionEngineReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the WatcherDecisionEngine object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*WatcherDecisionEngineReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type WatcherReconciler

type WatcherReconciler struct {
	ReconcilerBase
}

WatcherReconciler reconciles a Watcher object

func (*WatcherReconciler) GetLogger

func (r *WatcherReconciler) GetLogger(ctx context.Context) logr.Logger

GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields

func (*WatcherReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*WatcherReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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