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:
parent
d1b314842c
commit
b9c09e6674
1 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue