Skip to content

Commit

Permalink
Add const
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxuan0923 committed Apr 9, 2024
1 parent d1aa705 commit a454720
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cluster-autoscaler/cloudprovider/azure/azure_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,10 @@ func (m *azureCache) fetchAzureResources() error {
}

const (
agentpoolNameTag = "aks-managed-poolName"
agentpoolTypeTag = "aks-managed-agentpool-type"
vmsPoolType = "VirtualMachines"
legacyAgentpoolNameTag = "poolName"
agentpoolNameTag = "aks-managed-poolName"
agentpoolTypeTag = "aks-managed-agentpool-type"
vmsPoolType = "VirtualMachines"
)

// fetchVirtualMachines returns the updated list of virtual machines in the config resource group using the Azure API.
Expand All @@ -223,7 +224,7 @@ func (m *azureCache) fetchVirtualMachines() (map[string][]compute.VirtualMachine
vmPoolName := tags[agentpoolNameTag]
// fall back to legacy tag name if not found
if vmPoolName == nil {
vmPoolName = tags["poolName"]
vmPoolName = tags[legacyAgentpoolNameTag]
}

if vmPoolName == nil {
Expand Down

0 comments on commit a454720

Please sign in to comment.