@@ -163,26 +163,26 @@ func Start(eventsOpts ArgoEventsControllerOpts) {
163
163
// by the EventSource. This controller provides the EventBus config via an env var which is why we need
164
164
// to reconcile the EventSource when the EventBus status.config updates.
165
165
if err := eventSourceController .Watch (
166
- source .Kind (mgr .GetCache (), & aev1.EventBus {},
167
- handler.TypedEnqueueRequestsFromMapFunc [* aev1.EventBus ](func (ctx context.Context , eventBus * aev1.EventBus ) []reconcile.Request {
168
- var eventSourceList aev1.EventSourceList
169
- if err := mgr .GetClient ().List (ctx , & eventSourceList , client .InNamespace (eventBus .Namespace )); err != nil {
170
- logger .Errorw ("Failed to list EventSources" , zap .Error (err ))
171
- return nil
172
- }
173
- var requests []reconcile.Request
174
- for _ , es := range eventSourceList .Items {
175
- requests = append (requests , reconcile.Request {
176
- NamespacedName : types.NamespacedName {
177
- Name : es .Name ,
178
- Namespace : es .Namespace ,
179
- },
180
- })
181
- }
182
- return requests
183
- }),
184
- common.EventBusConfigStatusChangedPredicate {},
185
- )); err != nil {
166
+ source .Kind (mgr .GetCache (), & aev1.EventBus {},
167
+ handler.TypedEnqueueRequestsFromMapFunc [* aev1.EventBus ](func (ctx context.Context , eventBus * aev1.EventBus ) []reconcile.Request {
168
+ var eventSourceList aev1.EventSourceList
169
+ if err := mgr .GetClient ().List (ctx , & eventSourceList , client .InNamespace (eventBus .Namespace )); err != nil {
170
+ logger .Errorw ("Failed to list EventSources" , zap .Error (err ))
171
+ return nil
172
+ }
173
+ var requests []reconcile.Request
174
+ for _ , es := range eventSourceList .Items {
175
+ requests = append (requests , reconcile.Request {
176
+ NamespacedName : types.NamespacedName {
177
+ Name : es .Name ,
178
+ Namespace : es .Namespace ,
179
+ },
180
+ })
181
+ }
182
+ return requests
183
+ }),
184
+ common.EventBusConfigStatusChangedPredicate {},
185
+ )); err != nil {
186
186
logger .Fatalw ("Unable to watch EventBus for EventSource updates" , zap .Error (err ))
187
187
}
188
188
0 commit comments