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: update all nodes at startup when NodeFeature API enabled

We want to always update all nodes at startup. Without this patch we
don't get any update event from the controller if no NodeFeature or
NodeFeatureRule objects exist in the cluster. Thus all nodes would stay
untouched whereas we really want to remove all labels from all nodes in
this case.
This commit is contained in:
Markus Lehtonen 2022-12-14 20:51:53 +02:00
parent d1b314842c
commit b9c09e6674

View file

@ -259,7 +259,9 @@ func (m *nfdMaster) runGrpcServer(errChan chan<- error) {
// nfdAPIUpdateHandler handles events from the nfd API controller.
func (m *nfdMaster) nfdAPIUpdateHandler() {
updateAll := false
// We want to unconditionally update all nodes at startup if gRPC is
// disabled (i.e. NodeFeature API is enabled)
updateAll := m.args.EnableNodeFeatureApi
updateNodes := make(map[string]struct{})
rateLimit := time.After(time.Second)
for {