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 ¶
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 ¶
func NewReconciler(m manager.Manager, of resource.ClaimKind, to resource.ClassKind, o ...ReconcilerOption) *Reconciler
NewReconciler returns a Reconciler that schedules resource claims to a resource class that matches their class selector.
type ReconcilerOption ¶
type ReconcilerOption func(*Reconciler)
A ReconcilerOption configures a Reconciler.
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.
func WithSchedulingJitterer ¶
func WithSchedulingJitterer(j Jitterer) ReconcilerOption
WithSchedulingJitterer specifies the Jitterer a Reconciler should use.