From f03f5efb6d5029bae7af0dde590490305437b140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Rigaut?= Date: Tue, 19 Aug 2025 17:25:10 +0200 Subject: [PATCH] add filter functions attributes in controller options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Rigaut --- pkg/controller/options.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/controller/options.go b/pkg/controller/options.go index 811632a3f..179a5412f 100644 --- a/pkg/controller/options.go +++ b/pkg/controller/options.go @@ -23,6 +23,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" + "github.com/crossplane/crossplane-runtime/v2/pkg/event" "github.com/crossplane/crossplane-runtime/v2/pkg/feature" "github.com/crossplane/crossplane-runtime/v2/pkg/logging" "github.com/crossplane/crossplane-runtime/v2/pkg/ratelimiter" @@ -39,6 +40,7 @@ func DefaultOptions() Options { PollInterval: 1 * time.Minute, MaxConcurrentReconciles: 1, Features: &feature.Flags{}, + EventFilterFunctions: []event.FilterFn{}, } } @@ -72,6 +74,9 @@ type Options struct { // Gate implements a gated function callback pattern. Gate Gate + + // EventFilterFunctions used to filter events emitted by the controllers. + EventFilterFunctions []event.FilterFn } // ForControllerRuntime extracts options for controller-runtime.