Skip to content

Commit 756e2d0

Browse files
authored
Merge pull request #868 from orange-cloudfoundry/event-filter-in-ctrl-options
Add filter functions attributes in controller options
2 parents df56d77 + f03f5ef commit 756e2d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/controller/options.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323

2424
"sigs.k8s.io/controller-runtime/pkg/controller"
2525

26+
"github.com/crossplane/crossplane-runtime/v2/pkg/event"
2627
"github.com/crossplane/crossplane-runtime/v2/pkg/feature"
2728
"github.com/crossplane/crossplane-runtime/v2/pkg/logging"
2829
"github.com/crossplane/crossplane-runtime/v2/pkg/ratelimiter"
@@ -39,6 +40,7 @@ func DefaultOptions() Options {
3940
PollInterval: 1 * time.Minute,
4041
MaxConcurrentReconciles: 1,
4142
Features: &feature.Flags{},
43+
EventFilterFunctions: []event.FilterFn{},
4244
}
4345
}
4446

@@ -72,6 +74,9 @@ type Options struct {
7274

7375
// Gate implements a gated function callback pattern.
7476
Gate Gate
77+
78+
// EventFilterFunctions used to filter events emitted by the controllers.
79+
EventFilterFunctions []event.FilterFn
7580
}
7681

7782
// ForControllerRuntime extracts options for controller-runtime.

0 commit comments

Comments
 (0)