Ramilito / kubesess

Kubectl plugin managing sessions
MIT License
205 stars 5 forks source link

Support multiple configs #26

Closed Ramilito closed 1 year ago

Ramilito commented 2 years ago

Is your feature request related to a problem? Please describe.

Need to support multiple config files

Describe the solution you'd like

If I have multiple config files, I would expect them to be merged into one

Describe alternatives you've considered

Manually merging them

Ramilito commented 2 years ago
image

This is one way of doing it, do we have other ideas?

Ramilito commented 1 year ago

Solved by merging all configs listed in the KUBECONFIG env.

kcirrr commented 1 year ago

Some alternatives allow configuring a path to read kubeconfigs from. That way you have all your kubeconfigs in tact without merging them.

That might also be an option/idea.

Ramilito commented 1 year ago

@kcirrr The solution I implemented actually doesn't modify the files, the merge is made on runtime!

It's the same way kubectl recommends multiple config files by listing them in the path of kubeconfig environment.

But what I think you want is to point to a folder with a bunch of config files?

kcirrr commented 1 year ago

@Ramilito Ah ok, that should work too! Yes that was what i meant, but might not be necessary if this solution works.

Ramilito commented 1 year ago

@kcirrr I think your solution is better, if we have loads of configs this might be a pain. We could have both also, they would run the same loop anyways, just on different paths. I'll create a different issue about improving this feature with a path to a folder! Thanks for the great input 🙏