controller

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	client.Client
	// contains filtered or unexported fields
}

Reconciler implements a Kubernetes reconciler for either a Service or Ingress resources. Use NewReconciler() to initialize.

func NewReconciler

func NewReconciler(obj runtime.Object, controllerClass string, configManager *configmanager.ConfigManager) *Reconciler

NewReconciler returns a new Reconciler for obj type Objects.

configManager is called with configuration updates from reconcile cycles.

controllerClass filters resources based on matching `kubernetes.io/XXXXX.class` where XXXXX is based on obj's type.

func (*Reconciler) ControllerClassMatch

func (r *Reconciler) ControllerClassMatch(meta metav1.Object) bool

ControllerClassMatch determines if an Object matches the controllerClass of the Reconciler or has no controllerClass

func (*Reconciler) InjectClient

func (r *Reconciler) InjectClient(c client.Client) error

InjectClient implements the Reconciler interface and accepts a new initialized client to be used by the reconciler internally

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(req reconcile.Request) (reconcile.Result, error)

Reconcile implements the Reconciler interface and conducts a reconcile loop on a given request. This is typically called by a controller-manager like that found inside an Operator.

func (*Reconciler) RemoveRoute

func (r *Reconciler) RemoveRoute(resource configmanager.ResourceIdentifier)

RemoveRoute removes a route entry from the ConfigManager associated with this Reconciler, if it currently exists.

It is not an error to remove a route which is not present.

func (*Reconciler) UpsertRoute

func (r *Reconciler) UpsertRoute(resource configmanager.ResourceIdentifier, obj runtime.Object)

UpsertRoute adds or updates a route entry into the ConfigManager associated with this Reconciler. It will only do so if the controllerClass matches or is absent

Jump to

Keyboard shortcuts

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