Documentation
¶
Overview ¶
Package predicate defines controller-runtime Predicates that are re-used by COSI controllers to filter resource events before controller reconcile. COSI's split controller/sidecar architecture means that COSI has many reconcile filter behaviors that can be reused between components but where composition of smaller, individual behaviors is helpful.
Index ¶
- func AnyCreate() predicate.Funcs
- func AnyDelete() predicate.Funcs
- func AnyGeneric() predicate.Funcs
- func BucketAccessHandoffOccurred(s *runtime.Scheme) predicate.Funcs
- func BucketAccessManagedByController(s *runtime.Scheme) predicate.Funcs
- func BucketAccessManagedBySidecar(s *runtime.Scheme) predicate.Funcs
- func GenerationChangedInUpdateOnly() predicate.Funcs
- func ProtectionFinalizerRemoved(s *runtime.Scheme) predicate.Funcs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyCreate ¶
AnyCreate returns a predicate that enqueues a reconcile for any Create event. The predicate does not enqueue requests for any non-Create events.
func AnyDelete ¶
AnyDelete returns a predicate that enqueues a reconcile for any Delete event. The predicate does not enqueue requests for any non-Delete events.
func AnyGeneric ¶
AnyGeneric returns a predicate that enqueues a reconcile for any Generic event. The predicate does not enqueue requests for any non-Generic events.
func BucketAccessHandoffOccurred ¶
BucketAccessHandoffOccurred implements a predicate that enqueues a BucketAccess reconcile for Update events where the managing component of the BucketAccess changes, indicating that handoff between Controller and Sidecar has occurred in either direction.
The predicate does not enqueue requests for any Create/Delete/Generic events. This ensures that other predicates can effectively filter out undesired non-Update events.
func BucketAccessManagedByController ¶
BucketAccessManagedByController implements a predicate that enqueues a BucketAccess reconcile for any event if (and only if) the BucketAccess should be managed by the COSI Controller.
func BucketAccessManagedBySidecar ¶
BucketAccessManagedBySidecar implements a predicate that enqueues a BucketAccess reconcile for any event if (and only if) the BucketAccess should be managed by the COSI Sidecar.
func GenerationChangedInUpdateOnly ¶
GenerationChangedInUpdateOnly implements a predicate that enqueues a reconcile for Update events where the generation changes. For most resources, a generation change means that the resource `spec` has changed, ignoring metadata and status changes.
The predicate does not enqueue requests for any Create/Delete/Generic events. This ensures that other predicates can effectively filter out undesired non-Update events.
This is a modified implementation of controller-runtime's GenerationChangedPredicate{} which does enqueue requests for all Create/Delete/Generic events -- behavior COSI does not always want.
func ProtectionFinalizerRemoved ¶
ProtectionFinalizerRemoved implements a predicate that enqueues a reconcile for Update events where the protection finalizer has been removed. This helps ensure that COSI always has a chance to re-apply the protection finalizer when it's needed.
The predicate does not enqueue requests for any Create/Delete/Generic events. This ensures that other predicates can effectively filter out undesired non-Update events.
Types ¶
This section is empty.