mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-15 17:50:49 +00:00
nfd-master: fix node status patching
Correctly patch the "status" subresource. This got broken when
refactoring the code in 7a050e7cf9
and
wasn't even catched by the unit tests as the fake kubernetes client
doesn't handle subresources as the real apiserver does.
This commit is contained in:
parent
a66e1d3004
commit
2382c34697
1 changed files with 1 additions and 1 deletions
|
@ -1419,7 +1419,7 @@ func (m *nfdMaster) patchNode(nodeName string, patches []utils.JsonPatch, subres
|
|||
}
|
||||
data, err := json.Marshal(patches)
|
||||
if err == nil {
|
||||
_, err = m.k8sClient.CoreV1().Nodes().Patch(context.TODO(), nodeName, types.JSONPatchType, data, metav1.PatchOptions{})
|
||||
_, err = m.k8sClient.CoreV1().Nodes().Patch(context.TODO(), nodeName, types.JSONPatchType, data, metav1.PatchOptions{}, subresources...)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue