Skip to content

Commit

Permalink
Merge pull request #1160 from aleksandra-malinowska/refactor-cp-24
Browse files Browse the repository at this point in the history
Remove discoveryOptions from GKE manager constructor
  • Loading branch information
aleksandra-malinowska authored Aug 20, 2018
2 parents c008081 + 0bcad0e commit e438e6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ func NewCloudProvider(opts config.AutoscalingOptions) cloudprovider.CloudProvide
glog.Fatalf("GKE gets nodegroup specification via API, command line specs are not allowed")
}
if opts.NodeAutoprovisioningEnabled {
return buildGKE(opts, do, rl, gke.ModeGKENAP)
return buildGKE(opts, rl, gke.ModeGKENAP)
}
return buildGKE(opts, do, rl, gke.ModeGKE)
return buildGKE(opts, rl, gke.ModeGKE)
case aws.ProviderName:
return buildAWS(opts, do, rl)
case azure.ProviderName:
Expand Down Expand Up @@ -110,7 +110,7 @@ func buildGCE(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscover
return provider
}

func buildGKE(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, mode gke.GcpCloudProviderMode) cloudprovider.CloudProvider {
func buildGKE(opts config.AutoscalingOptions, rl *cloudprovider.ResourceLimiter, mode gke.GcpCloudProviderMode) cloudprovider.CloudProvider {
var config io.ReadCloser
if opts.CloudConfig != "" {
var err error
Expand All @@ -121,7 +121,7 @@ func buildGKE(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscover
defer config.Close()
}

manager, err := gke.CreateGkeManager(config, mode, opts.ClusterName, do, opts.Regional)
manager, err := gke.CreateGkeManager(config, mode, opts.ClusterName, opts.Regional)
if err != nil {
glog.Fatalf("Failed to create GKE Manager: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cluster-autoscaler/cloudprovider/gke/gke_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ type gkeManagerImpl struct {
}

// CreateGkeManager constructs gkeManager object.
func CreateGkeManager(configReader io.Reader, mode GcpCloudProviderMode, clusterName string, discoveryOpts cloudprovider.NodeGroupDiscoveryOptions, regional bool) (GkeManager, error) {
func CreateGkeManager(configReader io.Reader, mode GcpCloudProviderMode, clusterName string, regional bool) (GkeManager, error) {
// Create Google Compute Engine token.
var err error
tokenSource := google.ComputeTokenSource("")
Expand Down

0 comments on commit e438e6b

Please sign in to comment.