Skip to content

Commit b76b7ba

Browse files
committed
Start informer
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
1 parent 9429896 commit b76b7ba

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/reconciler/broker/controller.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ package broker
1818

1919
import (
2020
"context"
21+
"os"
22+
23+
"knative.dev/pkg/injection"
2124

2225
"knative.dev/eventing/pkg/auth"
2326

@@ -69,7 +72,12 @@ func NewController(
6972
logger := logging.FromContext(ctx)
7073
brokerInformer := brokerinformer.Get(ctx)
7174
subscriptionInformer := subscriptioninformer.Get(ctx)
72-
endpointsInformer := namespacedinformerfactory.Get(ctx).Core().V1().Endpoints()
75+
76+
endpointsInformer := namespacedinformerfactory.Get(ctx).Core().V1().Endpoints().Informer()
77+
if err := controller.StartInformers(ctx.Done(), endpointsInformer); err != nil {
78+
logger.Fatalw("Failed to start namespaced endpoints informer", zap.Error(err))
79+
}
80+
7381
configmapInformer := configmapinformer.Get(ctx)
7482
secretInformer := secretinformer.Get(ctx)
7583
eventPolicyInformer := eventpolicyinformer.Get(ctx)

0 commit comments

Comments
 (0)