1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-28 02:37:11 +00:00

Merge pull request #1660 from marquiz/devel/master-reconfigure-change

nfd-master: stop node-updater pool before reconfiguring api-controller
This commit is contained in:
Kubernetes Prow Robot 2024-04-15 11:10:32 -07:00 committed by GitHub
commit a7c58b121c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -353,6 +353,11 @@ func (m *nfdMaster) Run() error {
return err
}
// Stop the nodeUpdaterPool so that no node updates are underway
// while we reconfigure the NFD API controller (including the
// listers) below
m.nodeUpdaterPool.stop()
// restart NFD API controller
if m.nfdController != nil {
klog.InfoS("stopping the nfd api controller")
@ -364,13 +369,13 @@ func (m *nfdMaster) Run() error {
return nil
}
}
// Restart the nodeUpdaterPool
m.nodeUpdaterPool.start(m.config.NfdApiParallelism)
// Update all nodes when the configuration changes
if m.nfdController != nil && features.NFDFeatureGate.Enabled(features.NodeFeatureAPI) {
m.nfdController.updateAllNodesChan <- struct{}{}
}
// Restart the node updater pool
m.nodeUpdaterPool.stop()
m.nodeUpdaterPool.start(m.config.NfdApiParallelism)
case <-m.stop:
klog.InfoS("shutting down nfd-master")