1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-14 20:56:42 +00:00

nfd-master: log if node was modified (or not)

Be a bit more verbose what is happning.
This commit is contained in:
Markus Lehtonen 2022-09-21 14:15:37 +03:00
parent 0abae922fa
commit 8b652ab8ec

View file

@ -587,12 +587,18 @@ func (m *nfdMaster) updateNodeFeatures(nodeName string, labels Labels, annotatio
}
// patch node status with extended resource changes
patches = m.createExtendedResourcePatches(node, extendedResources)
err = m.apihelper.PatchNodeStatus(cli, node.Name, patches)
statusPatches := m.createExtendedResourcePatches(node, extendedResources)
err = m.apihelper.PatchNodeStatus(cli, node.Name, statusPatches)
if err != nil {
return fmt.Errorf("error while patching extended resources: %v", err)
}
if len(patches) > 0 || len(statusPatches) > 0 {
klog.Infof("node %q updated", nodeName)
} else {
klog.V(1).Infof("no updates to node %q", nodeName)
}
return err
}