switch kubeconfig types to internal map[string]*struct

This commit is contained in:
deads2k
2015-06-29 14:39:48 -04:00
parent 33278e7910
commit 55f574c267
17 changed files with 181 additions and 190 deletions

View File

@@ -94,8 +94,12 @@ func (o createClusterOptions) run() error {
return err
}
cluster := o.modifyCluster(config.Clusters[o.name])
config.Clusters[o.name] = cluster
startingStanza, exists := config.Clusters[o.name]
if !exists {
startingStanza = clientcmdapi.NewCluster()
}
cluster := o.modifyCluster(*startingStanza)
config.Clusters[o.name] = &cluster
if err := ModifyConfig(o.configAccess, *config); err != nil {
return err