Don't export kubecfg if we're only doing a --dryrun

We don't have all the keys/certs yet!

Fix #136
This commit is contained in:
Justin Santa Barbara 2016-07-13 11:07:18 -04:00
parent 6c8d5d8ea7
commit 4b3b0ab59a
1 changed files with 12 additions and 10 deletions

View File

@ -368,18 +368,20 @@ func (c *CreateClusterCmd) Run() error {
return err
}
glog.Infof("Exporting kubecfg for cluster")
if !isDryrun {
glog.Infof("Exporting kubecfg for cluster")
x := &kutil.CreateKubecfg{
ClusterName: cluster.Name,
KeyStore: clusterRegistry.KeyStore(cluster.Name),
MasterPublicName: cluster.Spec.MasterPublicName,
}
defer x.Close()
x := &kutil.CreateKubecfg{
ClusterName: cluster.Name,
KeyStore: clusterRegistry.KeyStore(cluster.Name),
MasterPublicName: cluster.Spec.MasterPublicName,
}
defer x.Close()
err = x.WriteKubecfg()
if err != nil {
return err
err = x.WriteKubecfg()
if err != nil {
return err
}
}
return nil