Skip to content

Does not support multiple resources in one yaml file (separated by ---), load multi yaml documents from a single file - Yaml.loadAll() method #338

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

Closed
nikunjbanker opened this issue Dec 22, 2019 · 3 comments · Fixed by #344

Comments

@nikunjbanker
Copy link

Does not support multiple resources in one yaml file (separated by ---), which is quite common in daily use.

So do you get any plan for this? Its there in JAVA client library - kubernetes-client/java#207

Thanks.

@nikunjbanker nikunjbanker changed the title Not support to load multi yaml documents from a single file - Yaml.loadAll() method Does not support multiple resources in one yaml file (separated by ---), load multi yaml documents from a single file - Yaml.loadAll() method Dec 24, 2019
@brendandburns
Copy link
Contributor

fwiw, this was really annoying to implement in the Java library, you have to have a map from apigroup/kinds -> concrete types to do this right.

I will add something manual as a start.

@brendandburns
Copy link
Contributor

I added a simplified implementation here:

#344

It's a starting point. We can expand it to automagically find all of the apigroup -> Type mappings via reflection like Java does.

@brendandburns
Copy link
Contributor

There is code for this merged in 1.6.11 see this example:

https://github.com/kubernetes-client/csharp/blob/master/examples/yaml/Program.cs

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

Successfully merging a pull request may close this issue.

2 participants