Skip to content

Commit

Permalink
Use clearer variable names in cloud builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Nic Cope committed Dec 2, 2017
1 parent 7223092 commit 4af19f5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cluster-autoscaler/cloudprovider/builder/cloud_provider_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ func (b CloudProviderBuilder) buildGCE(do cloudprovider.NodeGroupDiscoveryOption
defer config.Close()
}

m, err := gce.CreateGceManager(config, mode, b.clusterName, do)
manager, err := gce.CreateGceManager(config, mode, b.clusterName, do)
if err != nil {
glog.Fatalf("Failed to create GCE Manager: %v", err)
}

p, err := gce.BuildGceCloudProvider(m, rl)
provider, err := gce.BuildGceCloudProvider(manager, rl)
if err != nil {
glog.Fatalf("Failed to create GCE cloud provider: %v", err)
}
return p
return provider
}

func (b CloudProviderBuilder) buildAWS(do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider {
Expand All @@ -130,16 +130,16 @@ func (b CloudProviderBuilder) buildAWS(do cloudprovider.NodeGroupDiscoveryOption
defer config.Close()
}

m, err := aws.CreateAwsManager(config, do)
manager, err := aws.CreateAwsManager(config, do)
if err != nil {
glog.Fatalf("Failed to create AWS Manager: %v", err)
}

p, err := aws.BuildAwsCloudProvider(m, rl)
provider, err := aws.BuildAwsCloudProvider(manager, rl)
if err != nil {
glog.Fatalf("Failed to create AWS cloud provider: %v", err)
}
return p
return provider
}

func (b CloudProviderBuilder) buildAzure(do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider {
Expand All @@ -155,15 +155,15 @@ func (b CloudProviderBuilder) buildAzure(do cloudprovider.NodeGroupDiscoveryOpti
} else {
glog.Info("Creating Azure Manager with default configuration.")
}
m, err := azure.CreateAzureManager(config)
manager, err := azure.CreateAzureManager(config)
if err != nil {
glog.Fatalf("Failed to create Azure Manager: %v", err)
}
p, err := azure.BuildAzureCloudProvider(m, do.NodeGroupSpecs, rl)
provider, err := azure.BuildAzureCloudProvider(manager, do.NodeGroupSpecs, rl)
if err != nil {
glog.Fatalf("Failed to create Azure cloud provider: %v", err)
}
return p
return provider
}

func (b CloudProviderBuilder) buildKubemark(do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider {
Expand Down Expand Up @@ -199,9 +199,9 @@ func (b CloudProviderBuilder) buildKubemark(do cloudprovider.NodeGroupDiscoveryO
}
go kubemarkController.Run(stop)

p, err := kubemark.BuildKubemarkCloudProvider(kubemarkController, do.NodeGroupSpecs, rl)
provider, err := kubemark.BuildKubemarkCloudProvider(kubemarkController, do.NodeGroupSpecs, rl)
if err != nil {
glog.Fatalf("Failed to create Kubemark cloud provider: %v", err)
}
return p
return provider
}

0 comments on commit 4af19f5

Please sign in to comment.