Skip to content

Commit

Permalink
Rename AKS provider to Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
Jont828 committed Oct 2, 2024
1 parent 7adcea6 commit 3d6a18a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion clusterloader2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ These flags are required for any test to be run.
- `kubeconfig` - path to the kubeconfig file.
- `testconfig` - path to the test config file. This flag can be used multiple times
if more than one test should be run.
- `provider` - Cluster provider. Options are: gce, gke, kind, kubemark, aws, local, vsphere, skeleton
- `provider` - Cluster provider, options are: gce, gke, kind, kubemark, aws, azure, local, vsphere, skeleton

#### Optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
prom "k8s.io/perf-tests/clusterloader2/pkg/prometheus/clients"
)

type AKSProvider struct {
type AzureProvider struct {
features Features
}

func NewAKSProvider(_ map[string]string) Provider {
return &AKSProvider{
func NewAzureProvider(_ map[string]string) Provider {
return &AzureProvider{
features: Features{
SupportProbe: true,
SupportImagePreload: true,
Expand All @@ -40,30 +40,30 @@ func NewAKSProvider(_ map[string]string) Provider {
}
}

func (p *AKSProvider) Name() string {
return AKSName
func (p *AzureProvider) Name() string {
return AzureName
}

func (p *AKSProvider) Features() *Features {
func (p *AzureProvider) Features() *Features {
return &p.features
}

func (p *AKSProvider) GetComponentProtocolAndPort(componentName string) (string, int, error) {
func (p *AzureProvider) GetComponentProtocolAndPort(componentName string) (string, int, error) {
return getComponentProtocolAndPort(componentName)
}

func (p *AKSProvider) GetConfig() Config {
func (p *AzureProvider) GetConfig() Config {
return Config{}
}

func (p *AKSProvider) RunSSHCommand(cmd, host string) (string, string, int, error) {
func (p *AzureProvider) RunSSHCommand(cmd, host string) (string, string, int, error) {
return runSSHCommand(cmd, host)
}

func (p *AKSProvider) Metadata(_ clientset.Interface) (map[string]string, error) {
func (p *AzureProvider) Metadata(_ clientset.Interface) (map[string]string, error) {
return nil, nil
}

func (p *AKSProvider) GetManagedPrometheusClient() (prom.Client, error) {
func (p *AzureProvider) GetManagedPrometheusClient() (prom.Client, error) {
return nil, ErrNoManagedPrometheus
}
3 changes: 2 additions & 1 deletion clusterloader2/pkg/provider/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ limitations under the License.
package provider

const (
AKSName = "aks"
AWSName = "aws"
AKSName = "aks"
AzureName = "azure"
AutopilotName = "autopilot"
EKSName = "eks"
GCEName = "gce"
Expand Down
4 changes: 2 additions & 2 deletions clusterloader2/pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ func NewProvider(initOptions *InitOptions) (Provider, error) {
configs[RootKubeConfigKey] = initOptions.KubemarkRootKubeConfigPath
}
switch initOptions.ProviderName {
case AKSName:
return NewAKSProvider(configs), nil
case AWSName:
return NewAWSProvider(configs), nil
case AzureName, AKSName: // AKSName is for backward compatibility.
return NewAzureProvider(configs), nil
case AutopilotName:
return NewAutopilotProvider(configs), nil
case EKSName:
Expand Down

0 comments on commit 3d6a18a

Please sign in to comment.