Skip to content

Commit

Permalink
Merge pull request #14 from galal-hussein/fix_race_condition
Browse files Browse the repository at this point in the history
Fix race condition
  • Loading branch information
Alena Prokharchyk authored Nov 15, 2017
2 parents 1fd6129 + f9b1173 commit 43eb1c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,21 @@ func ClusterUp(clusterFile string) (string, string, string, string, error) {
return APIURL, caCrt, clientCert, clientKey, err
}

err = kubeCluster.DeployNetworkPlugin()
err = kubeCluster.SaveClusterState(clusterFile)
if err != nil {
return APIURL, caCrt, clientCert, clientKey, err
}

err = kubeCluster.DeployK8sAddOns()
err = kubeCluster.DeployNetworkPlugin()
if err != nil {
return APIURL, caCrt, clientCert, clientKey, err
}

err = kubeCluster.SaveClusterState(clusterFile)
err = kubeCluster.DeployK8sAddOns()
if err != nil {
return APIURL, caCrt, clientCert, clientKey, err
}

APIURL = fmt.Sprintf("https://" + kubeCluster.ControlPlaneHosts[0].IP + ":6443")
caCrt = string(cert.EncodeCertPEM(kubeCluster.Certificates[pki.CACertName].Certificate))
clientCert = string(cert.EncodeCertPEM(kubeCluster.Certificates[pki.KubeAdminCommonName].Certificate))
Expand Down

0 comments on commit 43eb1c2

Please sign in to comment.