Skip to content

Commit

Permalink
Merge pull request #5604 from gandhipr/prachigandhi/cherry-pick-cloud…
Browse files Browse the repository at this point in the history
…-based-uri-skuClient-1.26

baseURI for skuClient based on cloud cherry-pick #5603
  • Loading branch information
k8s-ci-robot authored Mar 21, 2023
2 parents 29ac211 + 9097d25 commit 96d43c4
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 @@ -265,7 +265,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 96d43c4

Please sign in to comment.