-
Notifications
You must be signed in to change notification settings - Fork 1.5k
How to use patch on custom resources? #2166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think you can try Lines 92 to 94 in a97aeb9
|
We have a typeless api also with which you can use plain json/HashMap to deal with Custom Resources: https://github.com/fabric8io/kubernetes-client/blob/master/doc/CHEATSHEET.md#customresource-typeless-api |
@rohanKanojia the (Also note that, kubernetes api supports https://tools.ietf.org/html/rfc6902, which I need to use in this case since want to do additive operation on a list) But will check the typeless api, thank you for now! |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
@csviri have you managed to figure out how to safely patch using this library? |
@janotav no. (We took other appraoch for unrelated reasons.) |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I would like to add / delete some attributes using patch on custom resources. However its not clear to me how this should work using current API. (In my case I would like to add a finalizer)
This is the API I try to use
I assume this should be then a merge patch like defined here:
https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/#use-a-json-merge-patch-to-update-a-deployment
And in this RFC: https://tools.ietf.org/html/rfc7386
Does this mean that I should only set values that will be added / altered in the custom resource POJO? And other values should be null? But then how should I delete a field?
Thanks!
(also Is there a way to use similar to Json-P ?)
The text was updated successfully, but these errors were encountered: