@@ -153,16 +153,18 @@ func runStartCmd(_ *cobra.Command, _ []string) {
153
153
if startOpts .hypershiftDesiredConfigMap != "" {
154
154
// This is a hypershift-mode daemon
155
155
ctx := ctrlcommon .CreateControllerContext (ctx , cb )
156
+ nodeScopedInformer , nodeScopedInformerStartFunc := ctrlcommon .NewScopedNodeInformerFromClientBuilder (cb , startOpts .nodeName )
156
157
err := dn .HypershiftConnect (
157
158
startOpts .nodeName ,
158
159
kubeClient ,
159
- ctx . KubeInformerFactory . Core (). V1 (). Nodes () ,
160
+ nodeScopedInformer ,
160
161
startOpts .hypershiftDesiredConfigMap ,
161
162
)
162
163
if err != nil {
163
164
ctrlcommon .WriteTerminationError (err )
164
165
}
165
166
167
+ nodeScopedInformerStartFunc (stopCh )
166
168
ctx .KubeInformerFactory .Start (stopCh )
167
169
close (ctx .InformersStarted )
168
170
@@ -177,14 +179,16 @@ func runStartCmd(_ *cobra.Command, _ []string) {
177
179
178
180
ctrlctx := ctrlcommon .CreateControllerContext (ctx , cb )
179
181
182
+ nodeScopedInformer , nodeScopedInformerStartFunc := ctrlcommon .NewScopedNodeInformerFromClientBuilder (cb , startOpts .nodeName )
183
+
180
184
// create the daemon instance. this also initializes kube client items
181
185
// which need to come from the container and not the chroot.
182
186
err = dn .ClusterConnect (
183
187
startOpts .nodeName ,
184
188
kubeClient ,
185
189
ctrlctx .ClientBuilder .MachineConfigClientOrDie (componentName ),
186
190
ctrlctx .InformerFactory .Machineconfiguration ().V1 ().MachineConfigs (),
187
- ctrlctx . KubeInformerFactory . Core (). V1 (). Nodes () ,
191
+ nodeScopedInformer ,
188
192
ctrlctx .InformerFactory .Machineconfiguration ().V1 ().ControllerConfigs (),
189
193
ctrlctx .ClientBuilder .OperatorClientOrDie (componentName ),
190
194
startOpts .kubeletHealthzEnabled ,
@@ -201,6 +205,7 @@ func runStartCmd(_ *cobra.Command, _ []string) {
201
205
ctrlctx .KubeNamespacedInformerFactory .Start (stopCh )
202
206
ctrlctx .InformerFactory .Start (stopCh )
203
207
ctrlctx .OperatorInformerFactory .Start (stopCh )
208
+ nodeScopedInformerStartFunc (ctrlctx .Stop )
204
209
close (ctrlctx .InformersStarted )
205
210
206
211
select {
@@ -225,7 +230,7 @@ func runStartCmd(_ *cobra.Command, _ []string) {
225
230
criClient ,
226
231
ctrlctx .ClientBuilder .MachineConfigClientOrDie (componentName ),
227
232
ctrlctx .InformerFactory .Machineconfiguration ().V1alpha1 ().PinnedImageSets (),
228
- ctrlctx . KubeInformerFactory . Core (). V1 (). Nodes () ,
233
+ nodeScopedInformer ,
229
234
ctrlctx .InformerFactory .Machineconfiguration ().V1 ().MachineConfigPools (),
230
235
resource .MustParse (constants .MinFreeStorageAfterPrefetch ),
231
236
constants .DefaultCRIOSocketPath ,
0 commit comments