Skip to content
Open
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
8 changes: 6 additions & 2 deletions cluster-autoscaler/cloudprovider/builder/builder_all.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !gce && !aws && !azure && !kubemark && !alicloud && !magnum && !digitalocean && !clusterapi && !huaweicloud && !ionoscloud && !linode && !hetzner && !bizflycloud && !brightbox && !equinixmetal && !oci && !vultr && !tencentcloud && !scaleway && !externalgrpc && !civo && !rancher && !volcengine && !baiducloud && !cherry && !cloudstack && !exoscale && !kamatera && !ovhcloud && !kwok
// +build !gce,!aws,!azure,!kubemark,!alicloud,!magnum,!digitalocean,!clusterapi,!huaweicloud,!ionoscloud,!linode,!hetzner,!bizflycloud,!brightbox,!equinixmetal,!oci,!vultr,!tencentcloud,!scaleway,!externalgrpc,!civo,!rancher,!volcengine,!baiducloud,!cherry,!cloudstack,!exoscale,!kamatera,!ovhcloud,!kwok
//go:build !gce && !aws && !azure && !kubemark && !alicloud && !magnum && !digitalocean && !clusterapi && !huaweicloud && !ionoscloud && !linode && !hetzner && !bizflycloud && !brightbox && !equinixmetal && !oci && !vultr && !tencentcloud && !scaleway && !externalgrpc && !civo && !rancher && !volcengine && !baiducloud && !cherry && !cloudstack && !exoscale && !kamatera && !ovhcloud && !kwok && !vcloud
// +build !gce,!aws,!azure,!kubemark,!alicloud,!magnum,!digitalocean,!clusterapi,!huaweicloud,!ionoscloud,!linode,!hetzner,!bizflycloud,!brightbox,!equinixmetal,!oci,!vultr,!tencentcloud,!scaleway,!externalgrpc,!civo,!rancher,!volcengine,!baiducloud,!cherry,!cloudstack,!exoscale,!kamatera,!ovhcloud,!kwok,!vcloud

/*
Copyright 2018 The Kubernetes Authors.
Expand Down Expand Up @@ -48,6 +48,7 @@ import (
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/rancher"
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/scaleway"
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud"
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/vcloud"
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/volcengine"
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/vultr"
"k8s.io/autoscaler/cluster-autoscaler/config"
Expand Down Expand Up @@ -84,6 +85,7 @@ var AvailableCloudProviders = []string{
cloudprovider.CivoProviderName,
cloudprovider.ScalewayProviderName,
cloudprovider.RancherProviderName,
cloudprovider.VcloudProviderName,
cloudprovider.VolcengineProviderName,
}

Expand Down Expand Up @@ -151,6 +153,8 @@ func buildCloudProvider(opts config.AutoscalingOptions,
return scaleway.BuildScaleway(opts, do, rl)
case cloudprovider.RancherProviderName:
return rancher.BuildRancher(opts, do, rl)
case cloudprovider.VcloudProviderName:
return vcloud.BuildVcloud(opts, do, rl)
case cloudprovider.VolcengineProviderName:
return volcengine.BuildVolcengine(opts, do, rl)
}
Expand Down
44 changes: 44 additions & 0 deletions cluster-autoscaler/cloudprovider/builder/builder_vcloud.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//go:build vcloud
// +build vcloud

/*
Copyright 2024 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package builder

import (
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider"
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/vcloud"
"k8s.io/autoscaler/cluster-autoscaler/config"
"k8s.io/client-go/informers"
)

// AvailableCloudProviders supported by the VCloud cloud provider builder
var AvailableCloudProviders = []string{
cloudprovider.VcloudProviderName,
}

// DefaultCloudProvider for VCloud-only build is VCloud
const DefaultCloudProvider = cloudprovider.VcloudProviderName

func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider {
switch opts.CloudProviderName {
case cloudprovider.VcloudProviderName:
return vcloud.BuildVcloud(opts, do, rl)
}

return nil
}
2 changes: 2 additions & 0 deletions cluster-autoscaler/cloudprovider/cloud_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ const (
CivoProviderName = "civo"
// RancherProviderName gets the provider name of rancher
RancherProviderName = "rancher"
// VcloudProviderName gets the provider name of vcloud
VcloudProviderName = "vcloud"
)

// GpuConfig contains the label, type and the resource name for a GPU.
Expand Down
Loading
Loading