Skip to content

Commit

Permalink
Remove discoveryOptions from GKE manager constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandra-malinowska committed Aug 20, 2018
1 parent 6777385 commit 0bcad0e
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 0bcad0e

Please sign in to comment.