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

Merge pull request #898 from marquiz/devel/master-log-updates

nfd-master: log if node was modified (or not)
This commit is contained in:
Kubernetes Prow Robot 2022-09-27 13:41:50 -07:00 committed by GitHub
commit 3cc5520dd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}