Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NamedPredicate ¶
NamedPredicate is an event handler that watches for a resource identified by a specific namespace and name.
func (NamedPredicate) Create ¶
func (w NamedPredicate) Create(e event.CreateEvent) bool
func (NamedPredicate) Delete ¶
func (w NamedPredicate) Delete(e event.DeleteEvent) bool
func (NamedPredicate) Generic ¶
func (w NamedPredicate) Generic(e event.GenericEvent) bool
func (NamedPredicate) Update ¶
func (w NamedPredicate) Update(e event.UpdateEvent) bool
type SecondaryPredicate ¶
SecondaryPredicate is a predicate that filters events for resources created as dependents of a primary resource. It follows the following rules:
- Create events are ignored because it is assumed that the controller reconciling the parent is the client creating the dependent resources.
- Update events are always handled.
- Deletion events are always handled because a controller will typically want to recreate deleted dependent resources if the primary resource is not deleted.
- Generic events are ignored.
SecondaryPredicate is most often used in conjunction with controller-runtime handler.EnqueueRequestForOwner
func (SecondaryPredicate) Create ¶
func (SecondaryPredicate) Create(event.CreateEvent) bool
Create filters out all events. It assumes that the controller reconciling the parent is the only client creating the dependent resources.
func (SecondaryPredicate) Delete ¶
func (SecondaryPredicate) Delete(event.DeleteEvent) bool
Delete passes all events through. This allows the controller to recreate deleted dependent resources if the primary resource is not deleted.
func (SecondaryPredicate) Generic ¶
func (SecondaryPredicate) Generic(event.GenericEvent) bool
Generic filters out all events.
func (SecondaryPredicate) Update ¶
func (SecondaryPredicate) Update(event.UpdateEvent) bool
Update passes all events through.