File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ import (
22
22
"time"
23
23
24
24
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-11-01/compute"
25
- azureautorest "github.com/Azure/go-autorest/autorest/azure"
26
25
"github.com/pkg/errors"
27
26
azprovider "sigs.k8s.io/cloud-provider-azure/pkg/provider"
28
27
"sigs.k8s.io/cluster-api-provider-azure/azure"
@@ -90,15 +89,11 @@ func newAzureManagedMachinePoolService(scope *scope.ManagedMachinePoolScope) (*a
90
89
// scaleSetAuthorizer takes a scope and determines if a regional authorizer is needed for scale sets
91
90
// see https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/1850 for context on region based authorizer.
92
91
func scaleSetAuthorizer (scope * scope.ManagedMachinePoolScope ) (azure.Authorizer , error ) {
93
- if scope .Location () == "" {
94
- return scope , nil // no location so use default
92
+ if scope .ControlPlane . Spec . AzureEnvironment == azure . PublicCloudName {
93
+ return azure . WithRegionalBaseURI ( scope , scope . Location ()) // public cloud supports regional end points
95
94
}
96
95
97
- if scope .ControlPlane .Spec .AzureEnvironment == azureautorest .USGovernmentCloud .Name {
98
- return scope , nil // no region support in usgovcloud
99
- }
100
-
101
- return azure .WithRegionalBaseURI (scope , scope .Location ())
96
+ return scope , nil
102
97
}
103
98
104
99
// Reconcile reconciles all the services in a predetermined order.
You can’t perform that action at this time.
0 commit comments