Skip to content
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

listNode api error #3671

Closed
chengdonglin opened this issue Aug 30, 2024 · 2 comments
Closed

listNode api error #3671

chengdonglin opened this issue Aug 30, 2024 · 2 comments

Comments

@chengdonglin
Copy link

I use the next code to test listNode() api:

CoreV1Api api = new CoreV1Api(client);
V1NodeList execute = api.listNode().execute();

response error:
Exception in thread "main" java.lang.IllegalArgumentException: Expected the field names to be an array in the JSON string but got null

I debug find the function JSON.deserialize(respBody, returnType) thnow the error,

Client Version 20.0.0
Kubernetes = 1.28.10
java = 17

@brendandburns
Copy link
Contributor

This is a duplicate of #3076

tl;dr; there is a difference between the swagger schema and the Go JSON library in terms of how it treats empty arrays.

@brendandburns
Copy link
Contributor

For now you can use the legacy version to work around this. We can consider if we want to fix this in the upstream code generator, but honestly, I think this is a bug in the Kubernetes API server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants