1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-31 04:04:51 +00:00

nfd-master: skip NodeFeatureGroup informers if feature gate disabled

(cherry picked from commit acc94b9f73)
This commit is contained in:
Markus Lehtonen 2025-03-20 18:31:09 +02:00
parent eaa628487e
commit eece770fe9

View file

@ -1512,8 +1512,9 @@ func (m *nfdMaster) startNfdApiController() error {
}
klog.InfoS("starting the nfd api controller")
m.nfdController, err = newNfdController(kubeconfig, nfdApiControllerOptions{
DisableNodeFeature: !nfdfeatures.NFDFeatureGate.Enabled(nfdfeatures.NodeFeatureAPI) || !m.args.EnableNodeFeatureApi,
ResyncPeriod: m.config.ResyncPeriod.Duration,
DisableNodeFeature: !nfdfeatures.NFDFeatureGate.Enabled(nfdfeatures.NodeFeatureAPI) || !m.args.EnableNodeFeatureApi,
ResyncPeriod: m.config.ResyncPeriod.Duration,
DisableNodeFeatureGroup: !nfdfeatures.NFDFeatureGate.Enabled(nfdfeatures.NodeFeatureGroupAPI),
})
if err != nil {
return fmt.Errorf("failed to initialize CRD controller: %w", err)