Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
32 changes: 31 additions & 1 deletion exp/api/v1beta2/awsmanagedmachinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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.
Expand Down Expand Up @@ -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
Copy link
Contributor

@AmitSahastra AmitSahastra Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we planning to drop support for "CUSTOM"? Currently its mandatory while using LaunchTemplate with ami-id.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this question. The line you are commenting on include CUSTOM so the answer is no. Can you explain more in details what you are referring to?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I overlooked that part. Please ignore

// +kubebuilder:default:=AL2_x86_64
// +optional
AMIType *ManagedMachineAMIType `json:"amiType,omitempty"`
Expand Down
28 changes: 28 additions & 0 deletions pkg/cloud/converters/eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down