-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
Export functionality to load Kubeconfig from text #718
Labels
Milestone
Comments
Like this? let config: Kubeconfig = serde_yaml::from_str(secret).unwrap(); |
imp
added a commit
to imp/kube-rs
that referenced
this issue
Nov 18, 2021
Also add Kubeconfig::from_text() Fixes kube-rs#718
I guess it makes sense to expose something that does what I'm 👍 . Happy to review a PR. |
imp
added a commit
to imp/kube-rs
that referenced
this issue
Nov 18, 2021
Also add Kubeconfig::from_text() Fixes kube-rs#718 Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com>
imp
added a commit
to imp/kube-rs
that referenced
this issue
Nov 20, 2021
Fixes kube-rs#718 Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com>
imp
added a commit
to imp/kube-rs
that referenced
this issue
Nov 20, 2021
Fixes kube-rs#718 Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com>
clux
added a commit
that referenced
this issue
Nov 20, 2021
* Conditionally derive PartialEq for Kubeconfig and children Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com> * Add helper for parsing kubeconfig YAML text Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com> * Add Kubeconfig::from_yaml Fixes #718 Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com> * Update Kubeconfig::read_from to use YAML helper Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com> * Update unit tests Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com> * Update kube-client/src/config/file_config.rs Co-authored-by: Eirik A <sszynrae@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Would you like to work on this feature?
yes
What problem are you trying to solve?
Besides loading
Kubeconfig
from files or env var, there are situations where you have plain text coming from somewhere else, rather than a file. For example, when working with ClusterAPI theKubeconfig
is stored in the secret. It might be a good idea to provide animpl FromStr for Kubeconfig
and let every other higher-level functions just use it.Describe the solution you'd like
Describe alternatives you've considered
An alternative would be to write just a free-standing function or just implement it (really two-liners) in your own code.
Documentation, Adoption, Migration Strategy
Well, the use should be straightforward, via parse() method
Target crate for feature
kube-client
The text was updated successfully, but these errors were encountered: