Skip to content

Commit e59086d

Browse files
committed
Rename AKS provider to Azure
1 parent 85312c4 commit e59086d

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

clusterloader2/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ These flags are required for any test to be run.
2626
- kubeconfig - path to the kubeconfig file.
2727
- testconfig - path to the test config file. This flag can be used multiple times
2828
if more than one test should be run.
29-
- provider - Cluster provider, options are: gce, gke, kind, kubemark, aws, local, vsphere, skeleton
29+
- provider - Cluster provider, options are: gce, gke, kind, kubemark, aws, azure, local, vsphere, skeleton
3030

3131
#### Optional
3232

clusterloader2/pkg/provider/aks.go clusterloader2/pkg/provider/azure.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ import (
2121
prom "k8s.io/perf-tests/clusterloader2/pkg/prometheus/clients"
2222
)
2323

24-
type AKSProvider struct {
24+
type AzureProvider struct {
2525
features Features
2626
}
2727

28-
func NewAKSProvider(_ map[string]string) Provider {
29-
return &AKSProvider{
28+
func NewAzureProvider(_ map[string]string) Provider {
29+
return &AzureProvider{
3030
features: Features{
3131
SupportProbe: true,
3232
SupportImagePreload: true,
@@ -40,30 +40,30 @@ func NewAKSProvider(_ map[string]string) Provider {
4040
}
4141
}
4242

43-
func (p *AKSProvider) Name() string {
44-
return AKSName
43+
func (p *AzureProvider) Name() string {
44+
return AzureName
4545
}
4646

47-
func (p *AKSProvider) Features() *Features {
47+
func (p *AzureProvider) Features() *Features {
4848
return &p.features
4949
}
5050

51-
func (p *AKSProvider) GetComponentProtocolAndPort(componentName string) (string, int, error) {
51+
func (p *AzureProvider) GetComponentProtocolAndPort(componentName string) (string, int, error) {
5252
return getComponentProtocolAndPort(componentName)
5353
}
5454

55-
func (p *AKSProvider) GetConfig() Config {
55+
func (p *AzureProvider) GetConfig() Config {
5656
return Config{}
5757
}
5858

59-
func (p *AKSProvider) RunSSHCommand(cmd, host string) (string, string, int, error) {
59+
func (p *AzureProvider) RunSSHCommand(cmd, host string) (string, string, int, error) {
6060
return runSSHCommand(cmd, host)
6161
}
6262

63-
func (p *AKSProvider) Metadata(_ clientset.Interface) (map[string]string, error) {
63+
func (p *AzureProvider) Metadata(_ clientset.Interface) (map[string]string, error) {
6464
return nil, nil
6565
}
6666

67-
func (p *AKSProvider) GetManagedPrometheusClient() (prom.Client, error) {
67+
func (p *AzureProvider) GetManagedPrometheusClient() (prom.Client, error) {
6868
return nil, ErrNoManagedPrometheus
6969
}

clusterloader2/pkg/provider/constants.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ limitations under the License.
1717
package provider
1818

1919
const (
20-
AKSName = "aks"
2120
AWSName = "aws"
21+
AKSName = "aks"
22+
AzureName = "azure"
2223
AutopilotName = "autopilot"
2324
EKSName = "eks"
2425
GCEName = "gce"

clusterloader2/pkg/provider/provider.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ func NewProvider(initOptions *InitOptions) (Provider, error) {
108108
configs[RootKubeConfigKey] = initOptions.KubemarkRootKubeConfigPath
109109
}
110110
switch initOptions.ProviderName {
111-
case AKSName:
112-
return NewAKSProvider(configs), nil
113111
case AWSName:
114112
return NewAWSProvider(configs), nil
113+
case AzureName, AKSName: // AKSName is for backward compatibility.
114+
return NewAzureProvider(configs), nil
115115
case AutopilotName:
116116
return NewAutopilotProvider(configs), nil
117117
case EKSName:

0 commit comments

Comments
 (0)