Closed hariramshankar closed 1 year ago
The latest object.{h,c}
in master
branch have changed. Please check out and check if they can meet your requirement.
You can populate the "patch json string" to object->temporary
https://github.com/kubernetes-client/c/blob/eb35d276690107cfc57395e3b7388e549b81a17d/kubernetes/model/object.c#L25-L35
I also looked at the generics API in include/generic.h. The file does not have a patch/replace call for the status subresource.
Yes. the generic client cannot send the request to subresources(status, scale) now, we will add the feature later and the contributions are welcome !
Thank you, the latest object.{h,c}
in master and populating the JSON string to object->temporary
works now when calling CustomObjectsAPI_replaceNamespacedCustomObject()
and CustomObjectsAPI_patchNamespacedCustomObjectStatus()
Hi there, what would be the recommended way of modifying (replace/ merge) the status subresource of a namespaced Custom Resource?
Reading the code the APIs of interest are CustomObjectsAPI_replaceNamespacedCustomObject() CustomObjectsAPI_patchNamespacedCustomObjectStatus() But looking at the implementation kubernetes/api/CustomObjectsAPI.c, I see both call object_convertToJSON
But object_convertToJSON(), does not do anything with the CJSON *item that is created in it
As a result the localVarBodyParameters in CustomObjectsAPI_replaceNamespacedCustomObject() and CustomObjectsAPI_patchNamespacedCustomObjectStatus() methods are not set properly.
I also looked at the generics API in include/generic.h. The file does not have a patch/replace call for the status subresource.
Is this an issue with the code in the way object_convertToJSON() does not handle the object arg or is there another way to update the status sub resource of the CR?