From 45baa6aad0b3d48a9e3f62e1f5c04298b1ef4d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 25 Jan 2022 21:03:09 +0200 Subject: [PATCH] Add Amazon Linux 2 as supported OS --- pkg/cluster/operation/check.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/cluster/operation/check.go b/pkg/cluster/operation/check.go index d0c3b20e8c..25808fb5b4 100644 --- a/pkg/cluster/operation/check.go +++ b/pkg/cluster/operation/check.go @@ -165,6 +165,14 @@ func checkOSInfo(opt *CheckOptions, osInfo *sysinfo.OS) *CheckResult { // check OS vendor switch osInfo.Vendor { + case "amzn": + // Amazon Linux 2 is based on CentOS 7 and is recommended for + // AWS Graviton 2 (ARM64) deployments. + if ver, _ := strconv.ParseFloat(osInfo.Version, 64); ver < 2 || ver >= 3 { + result.Err = fmt.Errorf("%s %s not supported, use version 2 please", + osInfo.Name, osInfo.Release) + return result + } case "centos", "redhat", "rhel": // check version // CentOS 8 is known to be not working, and we don't have plan to support it