predicate

package
v0.0.0-...-819f6d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyCreate

func AnyCreate() predicate.Funcs

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

func AnyDelete() predicate.Funcs

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

func AnyGeneric() predicate.Funcs

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

func BucketAccessHandoffOccurred(s *runtime.Scheme) predicate.Funcs

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

func BucketAccessManagedByController(s *runtime.Scheme) predicate.Funcs

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

func BucketAccessManagedBySidecar(s *runtime.Scheme) predicate.Funcs

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

func GenerationChangedInUpdateOnly() predicate.Funcs

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

func ProtectionFinalizerRemoved(s *runtime.Scheme) predicate.Funcs

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL