Skip to content

Commit 2382c34

Browse files
committed
nfd-master: fix node status patching
Correctly patch the "status" subresource. This got broken when refactoring the code in 7a050e7 and wasn't even catched by the unit tests as the fake kubernetes client doesn't handle subresources as the real apiserver does.
1 parent a66e1d3 commit 2382c34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/nfd-master/nfd-master.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ func (m *nfdMaster) patchNode(nodeName string, patches []utils.JsonPatch, subres
14191419
}
14201420
data, err := json.Marshal(patches)
14211421
if err == nil {
1422-
_, err = m.k8sClient.CoreV1().Nodes().Patch(context.TODO(), nodeName, types.JSONPatchType, data, metav1.PatchOptions{})
1422+
_, err = m.k8sClient.CoreV1().Nodes().Patch(context.TODO(), nodeName, types.JSONPatchType, data, metav1.PatchOptions{}, subresources...)
14231423
}
14241424
return err
14251425
}

0 commit comments

Comments
 (0)