Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename AKS provider to Azure #2864

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
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