Load namespaces using client-go

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan
2020-04-29 12:32:29 -07:00
parent 52bbf5c786
commit 1881107d55
5 changed files with 294 additions and 36 deletions

View File

@@ -55,6 +55,10 @@ func (k *Kubeconfig) Parse() error {
return nil
}
func (k *Kubeconfig) Bytes() ([]byte, error) {
return yaml.Marshal(k.rootNode)
}
func (k *Kubeconfig) Save() error {
if err := k.f.Reset(); err != nil {
return errors.Wrap(err, "failed to reset file")