diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml index 45eaef4300..0882235bd8 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml @@ -546,9 +546,22 @@ spec: - AL2_x86_64 - AL2_x86_64_GPU - AL2_ARM_64 + - CUSTOM + - BOTTLEROCKET_ARM_64 + - BOTTLEROCKET_x86_64 + - BOTTLEROCKET_ARM_64_FIPS + - BOTTLEROCKET_x86_64_FIPS + - BOTTLEROCKET_ARM_64_NVIDIA + - BOTTLEROCKET_x86_64_NVIDIA + - WINDOWS_CORE_2019_x86_64 + - WINDOWS_FULL_2019_x86_64 + - WINDOWS_CORE_2022_x86_64 + - WINDOWS_FULL_2022_x86_64 - AL2023_x86_64_STANDARD - AL2023_ARM_64_STANDARD - - CUSTOM + - AL2023_x86_64_NEURON + - AL2023_x86_64_NVIDIA + - AL2023_ARM_64_NVIDIA type: string amiVersion: description: |- diff --git a/exp/api/v1beta2/awsmanagedmachinepool_types.go b/exp/api/v1beta2/awsmanagedmachinepool_types.go index 08cf8568e9..0aeb7be0dc 100644 --- a/exp/api/v1beta2/awsmanagedmachinepool_types.go +++ b/exp/api/v1beta2/awsmanagedmachinepool_types.go @@ -27,6 +27,8 @@ import ( ) // ManagedMachineAMIType specifies which AWS AMI to use for a managed MachinePool. +// Source of truth can be found using the link below: +// https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateNodegroup.html#AmazonEKS-CreateNodegroup-request-amiType type ManagedMachineAMIType string const ( @@ -36,10 +38,38 @@ const ( Al2x86_64GPU ManagedMachineAMIType = "AL2_x86_64_GPU" // Al2Arm64 is the Arm AMI type. Al2Arm64 ManagedMachineAMIType = "AL2_ARM_64" + // Custom is the custom AMI type. + Custom ManagedMachineAMIType = "CUSTOM" + // BottleRocketArm64 is the Arm AMI type. + BottleRocketArm64 ManagedMachineAMIType = "BOTTLEROCKET_ARM_64" + // BottleRocketx86_64 is the BottleRocket x86-64 AMI type. + BottleRocketx86_64 ManagedMachineAMIType = "BOTTLEROCKET_x86_64" + // BottleRocketArm64Fips is the BottleRocket Arm Fips AMI type. + BottleRocketArm64Fips ManagedMachineAMIType = "BOTTLEROCKET_ARM_64_FIPS" + // BottleRocketx86_64Fips is the BottleRocket x86-64 Fips AMI type. + BottleRocketx86_64Fips ManagedMachineAMIType = "BOTTLEROCKET_x86_64_FIPS" + // BottleRocketArm64Nvidia is the BottleRocket Arm Nvidia AMI type. + BottleRocketArm64Nvidia ManagedMachineAMIType = "BOTTLEROCKET_ARM_64_NVIDIA" + // BottleRocketx86_64Nvidia is the BottleRocket x86-64 Nvidia AMI type. + BottleRocketx86_64Nvidia ManagedMachineAMIType = "BOTTLEROCKET_x86_64_NVIDIA" + // WindowsCore2019x86_64 is the Windows Core 2019 x86-64 AMI type. + WindowsCore2019x86_64 ManagedMachineAMIType = "WINDOWS_CORE_2019_x86_64" + // WindowsFull2019x86_64 is the Windows Full 2019 x86-64 AMI type. + WindowsFull2019x86_64 ManagedMachineAMIType = "WINDOWS_FULL_2019_x86_64" + // WindowsCore2022x86_64 is the Windows Core 2022 x86-64 AMI type. + WindowsCore2022x86_64 ManagedMachineAMIType = "WINDOWS_CORE_2022_x86_64" + // WindowsFull2022x86_64 is the Windows Full 2022 x86-64 AMI type. + WindowsFull2022x86_64 ManagedMachineAMIType = "WINDOWS_FULL_2022_x86_64" // Al2023x86_64 is the AL2023 x86-64 AMI type. Al2023x86_64 ManagedMachineAMIType = "AL2023_x86_64_STANDARD" // Al2023Arm64 is the AL2023 Arm AMI type. Al2023Arm64 ManagedMachineAMIType = "AL2023_ARM_64_STANDARD" + // Al2023x86_64Neuron is the AL2023 x86-64 Neuron AMI type. + Al2023x86_64Neuron ManagedMachineAMIType = "AL2023_x86_64_NEURON" + // Al2023x86_64Nvidia is the AL2023 x86-64 Nvidia AMI type. + Al2023x86_64Nvidia ManagedMachineAMIType = "AL2023_x86_64_NVIDIA" + // Al2023Arm64Nvidia is the AL2023 Arm Nvidia AMI type. + Al2023Arm64Nvidia ManagedMachineAMIType = "AL2023_ARM_64_NVIDIA" ) // ManagedMachinePoolCapacityType specifies the capacity type to be used for the managed MachinePool. @@ -129,7 +159,7 @@ type AWSManagedMachinePoolSpec struct { AMIVersion *string `json:"amiVersion,omitempty"` // AMIType defines the AMI type - // +kubebuilder:validation:Enum:=AL2_x86_64;AL2_x86_64_GPU;AL2_ARM_64;AL2023_x86_64_STANDARD;AL2023_ARM_64_STANDARD;CUSTOM + // +kubebuilder:validation:Enum:=AL2_x86_64;AL2_x86_64_GPU;AL2_ARM_64;CUSTOM;BOTTLEROCKET_ARM_64;BOTTLEROCKET_x86_64;BOTTLEROCKET_ARM_64_FIPS;BOTTLEROCKET_x86_64_FIPS;BOTTLEROCKET_ARM_64_NVIDIA;BOTTLEROCKET_x86_64_NVIDIA;WINDOWS_CORE_2019_x86_64;WINDOWS_FULL_2019_x86_64;WINDOWS_CORE_2022_x86_64;WINDOWS_FULL_2022_x86_64;AL2023_x86_64_STANDARD;AL2023_ARM_64_STANDARD;AL2023_x86_64_NEURON;AL2023_x86_64_NVIDIA;AL2023_ARM_64_NVIDIA // +kubebuilder:default:=AL2_x86_64 // +optional AMIType *ManagedMachineAMIType `json:"amiType,omitempty"` diff --git a/pkg/cloud/converters/eks.go b/pkg/cloud/converters/eks.go index 254ad7709d..fbb35c67c3 100644 --- a/pkg/cloud/converters/eks.go +++ b/pkg/cloud/converters/eks.go @@ -226,10 +226,38 @@ func AMITypeToSDK(amiType expinfrav1.ManagedMachineAMIType) ekstypes.AMITypes { return ekstypes.AMITypesAl2X8664Gpu case expinfrav1.Al2Arm64: return ekstypes.AMITypesAl2Arm64 + case expinfrav1.Custom: + return ekstypes.AMITypesCustom + case expinfrav1.BottleRocketArm64: + return ekstypes.AMITypesBottlerocketArm64 + case expinfrav1.BottleRocketx86_64: + return ekstypes.AMITypesBottlerocketX8664 + case expinfrav1.BottleRocketArm64Fips: + return ekstypes.AMITypesBottlerocketArm64Fips + case expinfrav1.BottleRocketx86_64Fips: + return ekstypes.AMITypesBottlerocketX8664Fips + case expinfrav1.BottleRocketArm64Nvidia: + return ekstypes.AMITypesBottlerocketArm64Nvidia + case expinfrav1.BottleRocketx86_64Nvidia: + return ekstypes.AMITypesBottlerocketX8664Nvidia + case expinfrav1.WindowsCore2019x86_64: + return ekstypes.AMITypesWindowsCore2019X8664 + case expinfrav1.WindowsFull2019x86_64: + return ekstypes.AMITypesWindowsFull2019X8664 + case expinfrav1.WindowsCore2022x86_64: + return ekstypes.AMITypesWindowsCore2022X8664 + case expinfrav1.WindowsFull2022x86_64: + return ekstypes.AMITypesWindowsFull2022X8664 case expinfrav1.Al2023Arm64: return ekstypes.AMITypesAl2023Arm64Standard case expinfrav1.Al2023x86_64: return ekstypes.AMITypesAl2023X8664Standard + case expinfrav1.Al2023x86_64Neuron: + return ekstypes.AMITypesAl2023X8664Neuron + case expinfrav1.Al2023x86_64Nvidia: + return ekstypes.AMITypesAl2023X8664Nvidia + case expinfrav1.Al2023Arm64Nvidia: + return ekstypes.AMITypesAl2023Arm64Nvidia default: return ekstypes.AMITypesCustom }