claimscheduling

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package claimscheduling provides a reconciler that selects a resource class for a resource claim.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ControllerName added in v0.5.0

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 schedules resource claims to a resource class that matches their class selector. Claims are reconciled by randomly selecting a matching resource class and attempting to set it as the claim's class reference. The Reconciler is designed for use in claim scheduling controllers that race several others to schedule a claim.

func NewReconciler

NewReconciler returns a Reconciler that schedules resource claims to a resource class that matches their class selector.

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 WithLogger added in v0.5.0

func WithLogger(l logging.Logger) ReconcilerOption

WithLogger specifies how the Reconciler should log messages.

func WithRecorder added in v0.5.0

func WithRecorder(er event.Recorder) ReconcilerOption

WithRecorder specifies how the Reconciler should record events.

func WithSchedulingJitterer

func WithSchedulingJitterer(j Jitterer) ReconcilerOption

WithSchedulingJitterer specifies the Jitterer a Reconciler should use.

Jump to

Keyboard shortcuts

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