v1

package
v0.0.0-...-50659db Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package v1 contains helpers to build a external controller reconciler. It defines a Controller interface which provides methods required for reconciling a external controller. It also provides an implementation of the Reconcile method that can be embedded in a controller to satisfy the controller-runtime's Reconciler interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	// InitReconcile initializes the node object request.
	InitReconcile(ctx context.Context, req reconcile.Request)

	// FetchInstance retrieves the request's object.
	FetchInstance() error

	// Operate runs the core operation of the controller that ensures that
	// the child objects or the other objects and configurations in the
	// environment are in the desired state. It should be able to update any
	// existing resources or create one, if there's a configuration drift,
	// based on the type of objects.
	// The returned result is the returned reconcile result. eventMessage is a
	// message that's emitted to the primary object. It's related to the change
	// done in the operation. A controller can use this to emit event of one
	// change performed by the reconciler and return the result with requeue
	// set to true.
	Operate() (result ctrl.Result, event eventv1.ReconcilerEvent, err error)
}

Controller is the controller interface that must be implemented by an external controller. It provides methods required for reconciling a external controller.

type ObjectReconciler

type ObjectReconciler struct {
	Log      logr.Logger
	C        Controller
	Recorder record.EventRecorder
}

ObjectReconciler defines a Kubernetes object reconciler.

func (ObjectReconciler) Reconcile

func (r ObjectReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile implements the object controller reconciliation.

Jump to

Keyboard shortcuts

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