Skip to content

Commit

Permalink
Start informer
Browse files Browse the repository at this point in the history
Signed-off-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
pierDipi committed Jan 22, 2025
1 parent 9429896 commit b76b7ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/reconciler/broker/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ package broker

import (
"context"
"os"

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / analyze / Go vulnerability Detection

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / build / Build

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / style / Golang / Lint

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / style / Golang / Lint

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / test / Unit Tests

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.31.4, ./test/e2e)

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.31.4, ./test/experimental)

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.30.8, ./test/experimental)

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.30.8, ./test/conformance)

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.31.4, ./test/conformance)

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.30.8, ./test/e2e)

"os" imported and not used

Check failure on line 21 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / analyze / Analyze CodeQL

"os" imported and not used

"knative.dev/pkg/injection"

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / analyze / Go vulnerability Detection

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / build / Build

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / style / Golang / Lint

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / style / Golang / Lint

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / test / Unit Tests

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.31.4, ./test/e2e)

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.31.4, ./test/experimental)

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.30.8, ./test/experimental)

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.30.8, ./test/conformance)

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.31.4, ./test/conformance)

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.30.8, ./test/e2e)

"knative.dev/pkg/injection" imported and not used

Check failure on line 23 in pkg/reconciler/broker/controller.go

View workflow job for this annotation

GitHub Actions / analyze / Analyze CodeQL

"knative.dev/pkg/injection" imported and not used

"knative.dev/eventing/pkg/auth"

Expand Down Expand Up @@ -69,7 +72,12 @@ func NewController(
logger := logging.FromContext(ctx)
brokerInformer := brokerinformer.Get(ctx)
subscriptionInformer := subscriptioninformer.Get(ctx)
endpointsInformer := namespacedinformerfactory.Get(ctx).Core().V1().Endpoints()

endpointsInformer := namespacedinformerfactory.Get(ctx).Core().V1().Endpoints().Informer()
if err := controller.StartInformers(ctx.Done(), endpointsInformer); err != nil {
logger.Fatalw("Failed to start namespaced endpoints informer", zap.Error(err))
}

configmapInformer := configmapinformer.Get(ctx)
secretInformer := secretinformer.Get(ctx)
eventPolicyInformer := eventpolicyinformer.Get(ctx)
Expand Down

0 comments on commit b76b7ba

Please sign in to comment.