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 ¶
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 ¶
func NewReconciler(m manager.Manager, of resource.ClaimKind, to resource.ClassKind, o ...ReconcilerOption) *Reconciler
NewReconciler returns a Reconciler that sets the class reference of a resource claim to the resource class annotated as the default.
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.