Skip to content

Commit 55bb51e

Browse files
committed
library-go requires a separate informer for cluster-level events as of b3f222c36d07383c7c45cf8b54db323719850f05
1 parent 6ddd8c6 commit 55bb51e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/operator/starter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func RunOperator(ctx context.Context, cc *controllercmd.ControllerContext) error
5252
}
5353

5454
configInformers := configv1informers.NewSharedInformerFactory(configClient, 10*time.Minute)
55+
clusterInformers := v1helpers.NewKubeInformersForNamespaces(kubeClient, "")
5556
kubeInformersForNamespaces := v1helpers.NewKubeInformersForNamespaces(kubeClient,
5657
"",
5758
operatorclient.GlobalUserSpecifiedConfigNamespace,
@@ -159,7 +160,7 @@ func RunOperator(ctx context.Context, cc *controllercmd.ControllerContext) error
159160
}
160161
versionRecorder.SetVersion("raw-internal", status.VersionForOperatorFromEnv())
161162

162-
staticPodControllers, err := staticpod.NewBuilder(operatorClient, kubeClient, kubeInformersForNamespaces, configInformers, cc.Clock).
163+
staticPodControllers, err := staticpod.NewBuilder(operatorClient, kubeClient, kubeInformersForNamespaces, clusterInformers.InformersFor(""), configInformers, cc.Clock).
163164
WithEvents(cc.EventRecorder).
164165
WithInstaller([]string{"cluster-kube-scheduler-operator", "installer"}).
165166
WithPruning([]string{"cluster-kube-scheduler-operator", "prune"}, "kube-scheduler-pod").

0 commit comments

Comments
 (0)