claimdefaulting

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package claimdefaulting provides a reconciler that sets the default resource class for a resource claim.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ControllerName

func ControllerName(kind string) string

ControllerName returns the recommended name for controllers that use this package to reconcile a particular kind of resource claim.

Types

type Jitterer

type Jitterer func()

A Jitterer sleeps for a random amount of time in order to decrease the chance of any one controller predictably winning the race to schedule claims to a class, for example because it has fewer classes to list and select from than its competitors.

type Reconciler

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

A Reconciler reconciles resource claims by setting their class reference to the resource class annotated as the default. If multiple classes are annotated as the default one of the annotated classes will be set, but which one is undefined.

func NewReconciler

NewReconciler returns a Reconciler that sets the class reference of a resource claim to the resource class annotated as the default.

func (*Reconciler) Reconcile

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

Reconcile a resource claim by using its class selector to select and allocate it a resource class.

type ReconcilerOption

type ReconcilerOption func(*Reconciler)

A ReconcilerOption configures a Reconciler.

func WithDefaultingJitterer

func WithDefaultingJitterer(j Jitterer) ReconcilerOption

WithDefaultingJitterer specifies the Jitterer a Reconciler should use.

func WithLogger

func WithLogger(l logging.Logger) ReconcilerOption

WithLogger specifies how the Reconciler should log messages.

func WithRecorder

func WithRecorder(er event.Recorder) ReconcilerOption

WithRecorder specifies how the Reconciler should record events.

Jump to

Keyboard shortcuts

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