diff --git a/eksconfig/add-on-managed-node-groups.go b/eksconfig/add-on-managed-node-groups.go index 43b778edd..f089e74cd 100644 --- a/eksconfig/add-on-managed-node-groups.go +++ b/eksconfig/add-on-managed-node-groups.go @@ -78,9 +78,9 @@ type MNG struct { ReleaseVersionValue float64 `json:"release-version-value" read-only:"true"` // AMIType is the AMI type for the node group. - // Allowed values are AL2_x86_64 and AL2_x86_64_GPU. + // Allowed values are AL2_x86_64, AL2_x86_64_GPU and AL2_ARM_64. // ref. https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html - // ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html + // ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-amitype AMIType string `json:"ami-type,omitempty"` // InstanceTypes is the EC2 instance types for the node instances. @@ -404,6 +404,10 @@ func (cfg *Config) validateAddOnManagedNodeGroups() error { if cur.RemoteAccessUserName != "ec2-user" { return fmt.Errorf("AMIType %q but unexpected RemoteAccessUserName %q", cur.AMIType, cur.RemoteAccessUserName) } + case eks.AMITypesAl2Arm64: + if cur.RemoteAccessUserName != "ec2-user" { + return fmt.Errorf("AMIType %q but unexpected RemoteAccessUserName %q", cur.AMIType, cur.RemoteAccessUserName) + } default: return fmt.Errorf("unknown ASGs[%q].AMIType %q", k, cur.AMIType) } @@ -417,6 +421,10 @@ func (cfg *Config) validateAddOnManagedNodeGroups() error { if len(cur.InstanceTypes) == 0 { cur.InstanceTypes = []string{DefaultNodeInstanceTypeGPU} } + case eks.AMITypesAl2Arm64: + if len(cur.InstanceTypes) == 0 { + cur.InstanceTypes = []string{DefaultNodeInstanceTypeARMCPU} + } default: return fmt.Errorf("unknown AddOnManagedNodeGroups.MNGs[%q].AMIType %q", k, cur.AMIType) } diff --git a/eksconfig/config.go b/eksconfig/config.go index d78e0071b..2abd2ad76 100644 --- a/eksconfig/config.go +++ b/eksconfig/config.go @@ -829,6 +829,8 @@ const ( // DefaultNodeInstanceTypeCPU is the default EC2 instance type for CPU worker node. DefaultNodeInstanceTypeCPU = "c5.xlarge" + // DefaultNodeInstanceTypeARMCPU is the default EC2 instance type for ARM CPU worker node. + DefaultNodeInstanceTypeARMCPU = "c6g.xlarge" // DefaultNodeInstanceTypeGPU is the default EC2 instance type for GPU worker node. DefaultNodeInstanceTypeGPU = "p3.8xlarge"