-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Unable to patch custom object with CustomObjectsApi.patchNamespacedCustomObject #3106
Comments
I've tried as well to adapt the examples for PatchUtils, but
|
thanks for reporting this, before we release a fix, please use either 19.x or 20.0.0-legacy to workaround the issue |
This bug is also in v20-legacy. Using v19 helps, though. |
@yue9944882 any fix for this? |
Ok ... I changed everything to use PatchUtil and seems like everything is ok now ! |
Describe the bug
Hello,
I'm trying to patch a custom resource following this official example:
https://github.com/kubernetes-client/java/blob/master/kubernetes/docs/CustomObjectsApi.md#patchNamespacedCustomObject
No matter what I specify in the body param (json patch string, yaml patch, a Map with CRD attributes), the result is always an HTTP 415 error response from the server:
Java client Version
20.0.0
Kubernetes Version
1.28
Java Version
Corretto-21.0.2
To Reproduce
Steps to reproduce the behavior:
Results in:
Expected behavior
The expectation is that the above code would modify the CRD.
Using
PatchUtils
doesn't seem an alternative for custom resources since the class to be patched (which would beObject
for a CRD) must be supplied:https://github.com/kubernetes-client/java/blob/master/examples/examples-release-18/src/main/java/io/kubernetes/client/examples/PatchExample.java
`
The text was updated successfully, but these errors were encountered: