Patch does not support patching status of resource ?
oshoval opened this issue · 1 comments
oshoval commented
Hello,
Trying the following code in order to patch status
of a node
(in order to create extended resources):
from kubernetes import client, config
from openshift.dynamic import DynamicClient
k8s_client = config.new_client_from_config()
dyn_client = DynamicClient(k8s_client)
v1_nodes = dyn_client.resources.get(api_version='v1', kind='Node')
body = {
'kind': 'Node',
'apiVersion': 'v1',
'metadata': {'name': 'worker'},
'status': {'capacity': {'example.com~1dongle': '4'}}
}
v1_nodes.patch(body=body)
It doesn't fail, but actually doesn't do anything to the node.
I believe its the same issue as kubernetes/kubernetes#67455
as it access /api/v1/nodes/worker
instead of /api/v1/nodes/worker/status
IIUC.
With kubectl proxy
and then curl to /api/v1/nodes/worker/status
it works.
Does this repo supports a proxy, or even better, other method that would allow us to patch node's status
?
(without creating RBACs)
Thanks
oshoval commented
closing as there is this one
https://github.com/ansible-collections/community.kubernetes/issues/356