Open sanjana-bhat opened 9 years ago
KubernetesList list = client.inNamespace(namespace).lists().load(is).get(); client.inNamespace(namespace).lists().create(list);
This worked. Closing the issue
Thanks for the report. The original code you posted should work still reopening.
The original code had empty items and hence it didn't work. Should you have a check that if there is no parameter passed then use the class member item?
Perfect! Would you be able to send in a PR for that?
Sure, will do!
Awesome! Thank you!
@jimmidyson, can you please guide me on how I can test this change locally before I submit the PR? Is there a contributor guide?
@sanjana-bhat Sorry we don't have a contributor guide right now - we'll try to get one created soon.
First I'd recommend adding an example to the kubernetes-example project & running that to test it out. We reference these examples for new users, demos, etc. Your example should compile & run so you can use it to test your code changes.
If you can, adding a test to https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/mock/KubernetesListTest.java would be awesome too.
Some time we will have proper integration tests, but so much other stuff to do that's taken priority right now unfortunately.
@sanjana-bhat did you get a chance to work on a PR?
@davsclaus I have worked on the PR https://github.com/fabric8io/kubernetes-client/pull/229 but I'm not sure on how to test it locally. Can you please help me with that?
I try to create services from a json file. But the output of the following is always empty and no services are created client.inNamespace(namespace).lists().load(inputStream).create() Output: BaseKubernetesList(apiVersion=v1, items=[], kind=List, metadata=null, additionalProperties={})
Below json works when used with kubectl
Any help here is really appreciated. Thanks!