Skip to content

Commit

Permalink
Merge pull request kubernetes#138 from justinsb/fix_136
Browse files Browse the repository at this point in the history
Don't export kubecfg if we're only doing a --dryrun
  • Loading branch information
justinsb authored Jul 13, 2016
2 parents 6c8d5d8 + 4b3b0ab commit 25d1e97
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions cmd/kops/create_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 25d1e97

Please sign in to comment.