reconciler

package
v2.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReconciler

func NewReconciler[T client.Object, L client.ObjectList](kube client.Client, reconciler Reconciler[T, L]) reconcile.Reconciler

NewReconciler returns a new instance of Reconciler.

Types

type Reconciler

type Reconciler[T client.Object, L client.ObjectList] interface {
	// NewObject returns a new instance of T.
	// Implementations should just return an empty object without any fields set.
	NewObject() T
	// NewObjectList returns a new instance of L.
	// Implementations should just return an empty object wihtout any fields set.
	NewObjectList() L
	// Provision is called when reconciling objects.
	// This is only called when the object exists and was fetched successfully.
	Provision(ctx context.Context, obj T) (controllerruntime.Result, error)
	// Deprovision is called when the object has a deletion timestamp set.
	Deprovision(ctx context.Context, obj T) (controllerruntime.Result, error)
}

Reconciler is a generic controller.

Jump to

Keyboard shortcuts

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