Comments (7)
Can you provide the body of the response that you got? You should be able to get it with ApiException.getResponseBody()
from java.
fwiw, I believe that this is either a bug in the openai spec or the kube api server.
If you look at the spec:
https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json
If you search for ContainerImage
you'll see that it is described as an array
of string. In JSON null
is not the same as []
I believe it needs to be either specified as a oneof(array, null)
in that schema or the API server should never return null
from java.
Here is the part of the body that I think causes the error:
"images": [
{
"names": null,
"sizeBytes": 974400966
},
...
]
We are contacting a k0s server but the same call works with the legacy version of the client.
As a side note, the exception does not throw an ApiException
, is it supposed to?
from java.
Thanks for the additional details. I would have thought that it would throw ApiException, but I guess there's no corresponding try/catch block.
With 20.0.0 we moved to a different code generator which is why there is a difference here.
For now, using legacy is probably the right thing to do. We need a reproduction in upstream k8s, not k0s to determine if this is really a bug.
from java.
I found the same error, which I can confirm is a bug, and the error message is as follows:
java.lang.IllegalArgumentException: Expected the field
namesto be an array in the JSON string but got
null`
at io.kubernetes.client.openapi.models.V1ContainerImage.validateJsonObject(V1ContainerImage.java:193)
at io.kubernetes.client.openapi.models.V1NodeStatus.validateJsonObject(V1NodeStatus.java:547)
at io.kubernetes.client.openapi.models.V1Node.validateJsonObject(V1Node.java:284)`
from java.
@pigstomach are you using k0s also? Or is this a true kubernetes api server?
from java.
Ok, I found the problem (I think):
OpenAPITools/openapi-generator#12549
We need to rev. past OpenAPITools/openapi-generator@7a7309e in the generator, likely update to 7.x (maybe 7.4?)
from java.
Related Issues (20)
- ReflectorRunnable restarting approximately every one minute. HOT 2
- an error with submit a pod by Yaml.loadAs(values, V1Pod.class); HOT 3
- How to set the host entries in ingress using SDK HOT 7
- how to use batch/v1beta1 for v19.0.0 ? HOT 1
- how to submit a yaml like kubectl create -f file.yaml ? HOT 2
- Release 21.0.0 and 21.0.0-legacy? HOT 4
- Client 20.0.1 changes to non-required Map fields break basic use cases HOT 2
- Unknown apiVersionKind XXXX is it registered? HOT 3
- java.net.SocketException: Connection or outbound has been closed HOT 1
- list listPodForAllNamespaces error HOT 5
- The CustomResourceDefinition "rayjobs.ray.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes HOT 1
- The copyFileToPodAsync method causes the process to fail to close! HOT 4
- Aaaa HOT 1
- Build client from specific KubeConfig HOT 6
- Error java.lang.IllegalArgumentException for the field 'appArmorProfile' in the JSON string not defined in the 'V1SecurityContext' properities HOT 5
- Error java.lang.IllegalArgumentException: Expected the field `containers` to be an array in the JSON string but got `null` HOT 4
- Watcher.eventReceived is still called after Watch.close HOT 2
- In-place Resource Resize for Kubernetes (> 1.27) Pods is not working through Java client HOT 1
- Kubectl should support cascading deletes for Jobs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java.