Documentation ¶
Overview ¶
Package predicate defines Predicates used by Controllers to filter Events before they are provided to EventHandlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FinalizerChangedPredicate ¶
FinalizerChangedPredicate implements a default update predicate function on finalizer change.
This predicate will skip update events that have no change in the object's finalizer. It is intended to be used in conjunction with the GenerationChangedPredicate, as in the following example:
Controller.Watch(
&source.Kind{Type: v1.MyCustomKind}, &handler.EnqueueRequestForObject{}, predicate.Or(predicate.GenerationChangedPredicate{}, predicate.FinalizerChangedPredicate{}))
This is mostly useful for controllers that needs to trigger both when the resource's generation is incremented (i.e., when the resource' .spec changes), or an finalizer changes.
func (FinalizerChangedPredicate) Update ¶
func (FinalizerChangedPredicate) Update(e event.UpdateEvent) bool
Click to show internal directories.
Click to hide internal directories.