Skip to content

Commit

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

baseURI for skuClient based on cloud cherry-pick #5603
  • Loading branch information
k8s-ci-robot authored Mar 21, 2023
2 parents 7d5b472 + 318139f commit 7a9a2ea
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 7a9a2ea

Please sign in to comment.