Documentation ¶
Index ¶
- Constants
- func ControllerName() string
- func Setup(mgr ctrl.Manager, o controller.Options) error
- func Terminating() xpv1.Condition
- type EnqueueRequestForResourceUsage
- func (e *EnqueueRequestForResourceUsage) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForResourceUsage) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForResourceUsage) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForResourceUsage) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface)
- type Reconciler
- type ReconcilerOption
Constants ¶
const ( TypeTerminating xpv1.ConditionType = "Terminating" ReasonInUse xpv1.ConditionReason = "InUse" )
Condition types and reasons.
Variables ¶
This section is empty.
Functions ¶
func ControllerName ¶
func ControllerName() string
ControllerName returns the recommended name for controllers that use this package to reconcile a particular kind of managed resource.
func Setup ¶
func Setup(mgr ctrl.Manager, o controller.Options) error
Setup adds a controller that reconciles ResourceUsages by accounting for their current usage.
func Terminating ¶
Terminating indicates a ResourceUsage has been deleted, but that the deletion is being blocked because it is still in use.
Types ¶
type EnqueueRequestForResourceUsage ¶
type EnqueueRequestForResourceUsage struct { }
EnqueueRequestForResourceUsage enqueues a reconcile.Request for a referenced ResourceUsage.
func (*EnqueueRequestForResourceUsage) Create ¶
func (e *EnqueueRequestForResourceUsage) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface)
Create adds a NamespacedName for the supplied CreateEvent if its Object is a ResourceUsageReferencer.
func (*EnqueueRequestForResourceUsage) Delete ¶
func (e *EnqueueRequestForResourceUsage) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface)
Delete adds a NamespacedName for the supplied DeleteEvent if its Object is a ResourceUsageReferencer.
func (*EnqueueRequestForResourceUsage) Generic ¶
func (e *EnqueueRequestForResourceUsage) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface)
Generic adds a NamespacedName for the supplied GenericEvent if its Object is a ResourceUsageReferencer.
func (*EnqueueRequestForResourceUsage) Update ¶
func (e *EnqueueRequestForResourceUsage) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface)
Update adds a NamespacedName for the supplied UpdateEvent if its Objects are a ResourceUsageReferencer.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
A Reconciler reconciles managed resources by creating and managing the lifecycle of an external resource, i.e. a resource in an external system such as a cloud provider API. Each controller must watch the managed resource kind for which it is responsible.
func NewReconciler ¶
func NewReconciler(m manager.Manager, o ...ReconcilerOption) *Reconciler
NewReconciler returns a Reconciler of ProviderConfigs.
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.