Kubernetes/OpenShift: Can I patch a node condition status?

311 views Asked by At

I am trying to patch the node condition type status, for example can I turn/replace the Whatever Node Condition type status from false to true and vice versa?

Edit: When I try to patch I am not getting any errors by yet not being updated.

Using Curl - I was able to update:

curl -k -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json-patch+json" -X PATCH APIserver:6443/api/v1/nodes/<node-name>/status --data '[{ "op": "replace", "path": "/status/conditions/-","value": { "type": "WhateverName", "status": "False" }}]' 

Patch Example (not working):

oc patch node/<Node-Name> --type='json' -p '[{ "op": "replace", "path": "/status/conditions/0","value": { "type": "QuayState", "status": "True" }}]'

It's not giving errors but it's not changing anything, I am getting this output:

node/<nodeName> patched (no change)
0

There are 0 answers