Skip to content

Commit

Permalink
Merge pull request #5603 from gandhipr/prachigandhi/cloud-based-uri-s…
Browse files Browse the repository at this point in the history
…kuClient

baseURI for skuClient based on cloud
  • Loading branch information
k8s-ci-robot authored Mar 17, 2023
2 parents 57bd2bc + 49dca4d commit 785444a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cluster-autoscaler/cloudprovider/azure/azure_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ func newAzClient(cfg *Config, env *azure.Environment) (*azClient, error) {
kubernetesServicesClient := containerserviceclient.New(aksClientConfig)
klog.V(5).Infof("Created kubernetes services client with authorizer: %v", kubernetesServicesClient)

skuClient := compute.NewResourceSkusClient(cfg.SubscriptionID)
// Reference on why selecting ResourceManagerEndpoint as baseURI -
// https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go
skuClient := compute.NewResourceSkusClientWithBaseURI(azClientConfig.ResourceManagerEndpoint, cfg.SubscriptionID)
skuClient.Authorizer = azClientConfig.Authorizer
klog.V(5).Infof("Created sku client with authorizer: %v", skuClient)

Expand Down

0 comments on commit 785444a

Please sign in to comment.