Skip to content

cluster autoscaler provider build tags broken for several providers #6492

Closed
@elmiko

Description

@elmiko

Which component are you using?:

cluster-autoscaler

What version of the component are you using?:

Component version: master

What k8s version are you using (kubectl version)?:

n/a

What environment is this in?:

n/a, build environment

What did you expect to happen?:

expect target binary to be built

What happened instead?:

$ go build --tags aws -o ./cluster-autoscaler-amd64 
# k8s.io/autoscaler/cluster-autoscaler/cloudprovider/builder
cloudprovider/builder/cloud_provider_builder.go:46:47: too many arguments in call to buildCloudProvider
        have ("k8s.io/autoscaler/cluster-autoscaler/config".AutoscalingOptions, "k8s.io/autoscaler/cluster-autoscaler/cloudprovider".NodeGroupDiscoveryOptions, *"k8s.io/autoscaler/cluster-autoscaler/cloudprovider".ResourceLimiter, informers.SharedInformerFactory)
        want ("k8s.io/autoscaler/cluster-autoscaler/config".AutoscalingOptions, "k8s.io/autoscaler/cluster-autoscaler/cloudprovider".NodeGroupDiscoveryOptions, *"k8s.io/autoscaler/cluster-autoscaler/cloudprovider".ResourceLimiter)

How to reproduce it (as minimally and precisely as possible):

run the following

go build --tags aws -o ./cluster-autoscaler-amd64 

Anything else we need to know?:

pr #5820 added an argument to the buildCloudProvider function, when building for all tags or kwok the build works fine, but when specifying a provider which has not implemented the builder change then the error listed above happens on build.

this is fairly easy to fix, but requires updating many of the builder files. an example fix can be seen in #6491

providers that need fixing:

  • alicloud
  • aws
  • azure
  • baiducloud
  • bizflycloud
  • brightbox
  • cherry
  • civo
  • cloudstack
  • digitalocean
  • exoscale
  • externalgrpc
  • gce
  • hetzner
  • huaweicloud
  • ionoscloud
  • kamatera
  • kubemark
  • linode
  • magnum
  • oci
  • ovhcloud
  • equinixmetal
  • rancher
  • scaleway
  • tencentcloud
  • volcengine
  • vultr

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions