Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove discoveryOptions from GKE manager constructor #1160

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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