Skip to content

Commit 5b376c6

Browse files
committed
operator: update static pod builder and pass cluster informers
1 parent aa758a8 commit 5b376c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/operator/starter.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func RunOperator(ctx context.Context, cc *controllercmd.ControllerContext) error
5454
if err != nil {
5555
return err
5656
}
57-
57+
clusterInformers := v1helpers.NewKubeInformersForNamespaces(kubeClient, "")
5858
configInformers := configinformers.NewSharedInformerFactory(configClient, 10*time.Minute)
5959
kubeInformersForNamespaces := v1helpers.NewKubeInformersForNamespaces(kubeClient,
6060
"",
@@ -199,7 +199,7 @@ func RunOperator(ctx context.Context, cc *controllercmd.ControllerContext) error
199199
}
200200
versionRecorder.SetVersion("raw-internal", status.VersionForOperatorFromEnv())
201201

202-
staticPodControllers, err := staticpod.NewBuilder(operatorClient, kubeClient, kubeInformersForNamespaces, configInformers, cc.Clock).
202+
staticPodControllers, err := staticpod.NewBuilder(operatorClient, kubeClient, kubeInformersForNamespaces, clusterInformers.InformersFor(""), configInformers, cc.Clock).
203203
WithEvents(cc.EventRecorder).
204204
WithInstaller([]string{"cluster-kube-controller-manager-operator", "installer"}).
205205
WithPruning([]string{"cluster-kube-controller-manager-operator", "prune"}, "kube-controller-manager-pod").
@@ -287,6 +287,7 @@ func RunOperator(ctx context.Context, cc *controllercmd.ControllerContext) error
287287
})
288288

289289
configInformers.Start(ctx.Done())
290+
clusterInformers.Start(ctx.Done())
290291
kubeInformersForNamespaces.Start(ctx.Done())
291292
dynamicInformers.Start(ctx.Done())
292293

0 commit comments

Comments
 (0)