Skip to content

Commit

Permalink
add informer argument to clusterapi provider builder
Browse files Browse the repository at this point in the history
This change adds the informer factory as an argument to the
`buildCloudProvider` function for clusterapi so that building with tags
will work properly.
  • Loading branch information
elmiko committed Jan 31, 2024
1 parent 7e95c7e commit 3937fa9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider"
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/clusterapi"
"k8s.io/autoscaler/cluster-autoscaler/config"
"k8s.io/client-go/informers"
)

// AvailableCloudProviders supported by the cloud provider builder.
Expand All @@ -33,7 +34,11 @@ var AvailableCloudProviders = []string{
// DefaultCloudProvider for machineapi-only build.
const DefaultCloudProvider = cloudprovider.ClusterAPIProviderName

func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider {
func buildCloudProvider(
opts config.AutoscalingOptions,
do cloudprovider.NodeGroupDiscoveryOptions,
rl *cloudprovider.ResourceLimiter,
_ informers.SharedInformerFactory) cloudprovider.CloudProvider {
switch opts.CloudProviderName {
case cloudprovider.ClusterAPIProviderName:
return clusterapi.BuildClusterAPI(opts, do, rl)
Expand Down

0 comments on commit 3937fa9

Please sign in to comment.