Skip to content

Commit

Permalink
Merge pull request #120 from ioito/hotfix/qx-aws-image
Browse files Browse the repository at this point in the history
fix: add amazon linux
  • Loading branch information
ioito authored Apr 10, 2024
2 parents 7c75358 + 745e8a5 commit 5c1bbbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions util/imagetools/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ func TestNormalizeImageInfo(t *testing.T) {
OsLang: "",
OsArch: "x86_64",
},
{
Name: "EKS Kubernetes Worker AMI with AmazonLinux2 image, (k8s: 1.24.17, docker: 20.10.*, containerd: 1.7.*)",
OsDistro: "Amazon Linux",
OsType: osprofile.OS_TYPE_LINUX,
OsVersion: "2",
OsLang: "",
OsArch: "x86_64",
},
}

for _, image := range images {
Expand Down
2 changes: 1 addition & 1 deletion util/imagetools/imagetools.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func normalizeOsDistribution(osDist string, imageName string) string {
return "Fedora"
} else if strings.Contains(osDist, "alma") {
return "AlmaLinux"
} else if strings.Contains(osDist, "amazon linux") {
} else if strings.Contains(osDist, "amazon linux") || strings.Contains(osDist, "amazonlinux") {
return "Amazon Linux"
} else if strings.Contains(osDist, "windows") {
for _, ver := range []string{"2003", "2008", "2012", "2016", "2019", "2022"} {
Expand Down

0 comments on commit 5c1bbbd

Please # to comment.