Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64 should be upper cased and a const #4018

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion azure/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
"github.com/Azure/go-autorest/autorest"
"sigs.k8s.io/cluster-api-provider-azure/util/tele"
"sigs.k8s.io/cluster-api-provider-azure/version"
Expand Down Expand Up @@ -303,7 +304,7 @@ func GetBootstrappingVMExtension(osType string, cloud string, vmName string, cpu
// Go on Ubuntu 20.04. The issue is being tracked here: https://github.com/golang/go/issues/58550
// TODO: Remove this once the issue is fixed, or when Ubuntu 20.04 is no longer supported.
extensionVersion := "1.0"
if cpuArchitectureType == "arm64" {
if cpuArchitectureType == string(armcompute.ArchitectureTypesArm64) {
extensionVersion = "1.1.1"
}
return &ExtensionSpec{
Expand Down
4 changes: 2 additions & 2 deletions azure/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,11 @@ func TestGetBootstrappingVMExtension(t *testing.T) {
expectedVersion: "1.0",
},
{
name: "Linux OS, Public Cloud, arm64 CPU Architecture",
name: "Linux OS, Public Cloud, ARM64 CPU Architecture",
osType: LinuxOS,
cloud: PublicCloudName,
vmName: "test-vm",
cpuArchitecture: "arm64",
cpuArchitecture: "Arm64",
expectedVersion: "1.1.1",
},
{
Expand Down