Skip to content

Commit eb7c231

Browse files
committed
UPSTREAM: 5532: Skip tag reconciliation in Azure Stack
The tag service using the V2 SDK is not available in azure stack. Skip tag reconciliation in Azure Stack environments.
1 parent 0ea7c64 commit eb7c231

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

controllers/azuremachine_reconciler.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package controllers
1818

1919
import (
2020
"context"
21+
"strings"
2122

2223
"github.com/pkg/errors"
2324

@@ -101,10 +102,13 @@ func newAzureMachineService(machineScope *scope.MachineScope) (*azureMachineServ
101102
virtualmachinesSvc,
102103
roleAssignmentsSvc,
103104
vmextensionsSvc,
104-
tagsSvc,
105105
},
106106
skuCache: cache,
107107
}
108+
if !strings.EqualFold(machineScope.CloudEnvironment(), azure.StackCloudName) {
109+
ams.services = append(ams.services, tagsSvc)
110+
}
111+
108112
ams.Reconcile = ams.reconcile
109113
ams.Pause = ams.pause
110114
ams.Delete = ams.delete

0 commit comments

Comments
 (0)