Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
detiber committed Aug 14, 2018
1 parent b576dd1 commit b546f32
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions clusterctl/clusterdeployer/clusterdeployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (d *ClusterDeployer) Create(cluster *clusterv1.Cluster, machines []*cluster
return fmt.Errorf("unable to apply cluster api stack to external cluster: %v", err)
}

glog.Info("Provisioning cluster via external cluster")
glog.Info("Provisioning cluster via external (bootstrapping) cluster")

glog.Infof("Creating cluster object %v on external cluster", cluster.Name)
if err := externalClient.CreateClusterObject(cluster); err != nil {
Expand All @@ -155,10 +155,10 @@ func (d *ClusterDeployer) Create(cluster *clusterv1.Cluster, machines []*cluster
targetCluster := "external"

if d.pivotCluster {
glog.Info("Creating internal cluster")
internalClient, err := d.createInternalCluster(externalClient, provider, kubeconfigOutput)
glog.Info("Creating internal cluster client")
internalClient, err := d.createInternalClusterClient(externalClient, provider, kubeconfigOutput)
if err != nil {
return fmt.Errorf("unable to create internal cluster: %v", err)
return fmt.Errorf("unable to create internal cluster client: %v", err)
}
defer closeClient(internalClient, "internal")
targetClient = internalClient
Expand Down Expand Up @@ -244,7 +244,7 @@ func (d *ClusterDeployer) createExternalCluster() (ClusterClient, func(), error)
return nil, cleanupFn, fmt.Errorf("could not create external control plane: %v", err)
}

if d.cleanupExternalCluster {
if d.cleanupExternalCluster && d.pivotCluster {
cleanupFn = func() {
glog.Info("Cleaning up external cluster.")
d.externalProvisioner.Delete()
Expand Down Expand Up @@ -281,7 +281,7 @@ func (d *ClusterDeployer) retrieveKubeConfig(externalClient ClusterClient, provi
return provisionedKubeconfig, nil
}

func (d *ClusterDeployer) createInternalCluster(externalClient ClusterClient, provider ProviderDeployer, kubeconfigOutput string) (ClusterClient, error) {
func (d *ClusterDeployer) createInternalClusterClient(externalClient ClusterClient, provider ProviderDeployer, kubeconfigOutput string) (ClusterClient, error) {
internalKubeconfig, err := d.retrieveKubeConfig(externalClient, provider, kubeconfigOutput)
if err != nil {
return nil, err
Expand Down

0 comments on commit b546f32

Please sign in to comment.