@@ -263,41 +263,45 @@ func validateLaunchTemplate(launchTemplateData *ec2types.ResponseLaunchTemplateD
263263
264264func getAMIType (ng * api.ManagedNodeGroup , instanceType string ) ekstypes.AMITypes {
265265 amiTypeMapping := map [string ]struct {
266- X86x64 ekstypes.AMITypes
267- X86GPU ekstypes.AMITypes
268- ARM ekstypes.AMITypes
269- ARMGPU ekstypes.AMITypes
266+ X86x64 ekstypes.AMITypes
267+ X86Nvidia ekstypes.AMITypes
268+ X86Neuron ekstypes.AMITypes
269+ ARM ekstypes.AMITypes
270+ ARMGPU ekstypes.AMITypes
270271 }{
271272 api .NodeImageFamilyAmazonLinux2023 : {
272- X86x64 : ekstypes .AMITypesAl2023X8664Standard ,
273- ARM : ekstypes .AMITypesAl2023Arm64Standard ,
273+ X86x64 : ekstypes .AMITypesAl2023X8664Standard ,
274+ X86Nvidia : ekstypes .AMITypesAl2023X8664Nvidia ,
275+ X86Neuron : ekstypes .AMITypesAl2023X8664Neuron ,
276+ ARM : ekstypes .AMITypesAl2023Arm64Standard ,
274277 },
275278 api .NodeImageFamilyAmazonLinux2 : {
276- X86x64 : ekstypes .AMITypesAl2X8664 ,
277- X86GPU : ekstypes .AMITypesAl2X8664Gpu ,
278- ARM : ekstypes .AMITypesAl2Arm64 ,
279+ X86x64 : ekstypes .AMITypesAl2X8664 ,
280+ X86Nvidia : ekstypes .AMITypesAl2X8664Gpu ,
281+ X86Neuron : ekstypes .AMITypesAl2X8664Gpu ,
282+ ARM : ekstypes .AMITypesAl2Arm64 ,
279283 },
280284 api .NodeImageFamilyBottlerocket : {
281- X86x64 : ekstypes .AMITypesBottlerocketX8664 ,
282- X86GPU : ekstypes .AMITypesBottlerocketX8664Nvidia ,
283- ARM : ekstypes .AMITypesBottlerocketArm64 ,
284- ARMGPU : ekstypes .AMITypesBottlerocketArm64Nvidia ,
285+ X86x64 : ekstypes .AMITypesBottlerocketX8664 ,
286+ X86Nvidia : ekstypes .AMITypesBottlerocketX8664Nvidia ,
287+ ARM : ekstypes .AMITypesBottlerocketArm64 ,
288+ ARMGPU : ekstypes .AMITypesBottlerocketArm64Nvidia ,
285289 },
286290 api .NodeImageFamilyWindowsServer2019FullContainer : {
287- X86x64 : ekstypes .AMITypesWindowsFull2019X8664 ,
288- X86GPU : ekstypes .AMITypesWindowsFull2019X8664 ,
291+ X86x64 : ekstypes .AMITypesWindowsFull2019X8664 ,
292+ X86Nvidia : ekstypes .AMITypesWindowsFull2019X8664 ,
289293 },
290294 api .NodeImageFamilyWindowsServer2019CoreContainer : {
291- X86x64 : ekstypes .AMITypesWindowsCore2019X8664 ,
292- X86GPU : ekstypes .AMITypesWindowsCore2019X8664 ,
295+ X86x64 : ekstypes .AMITypesWindowsCore2019X8664 ,
296+ X86Nvidia : ekstypes .AMITypesWindowsCore2019X8664 ,
293297 },
294298 api .NodeImageFamilyWindowsServer2022FullContainer : {
295- X86x64 : ekstypes .AMITypesWindowsFull2022X8664 ,
296- X86GPU : ekstypes .AMITypesWindowsFull2022X8664 ,
299+ X86x64 : ekstypes .AMITypesWindowsFull2022X8664 ,
300+ X86Nvidia : ekstypes .AMITypesWindowsFull2022X8664 ,
297301 },
298302 api .NodeImageFamilyWindowsServer2022CoreContainer : {
299- X86x64 : ekstypes .AMITypesWindowsCore2022X8664 ,
300- X86GPU : ekstypes .AMITypesWindowsCore2022X8664 ,
303+ X86x64 : ekstypes .AMITypesWindowsCore2022X8664 ,
304+ X86Nvidia : ekstypes .AMITypesWindowsCore2022X8664 ,
301305 },
302306 }
303307
@@ -307,13 +311,14 @@ func getAMIType(ng *api.ManagedNodeGroup, instanceType string) ekstypes.AMITypes
307311 }
308312
309313 switch {
310- case instanceutils .IsGPUInstanceType (instanceType ):
311- if instanceutils .IsARMInstanceType (instanceType ) {
312- return amiType .ARMGPU
313- }
314- return amiType .X86GPU
314+ case instanceutils .IsARMGPUInstanceType (instanceType ):
315+ return amiType .ARMGPU
315316 case instanceutils .IsARMInstanceType (instanceType ):
316317 return amiType .ARM
318+ case instanceutils .IsNvidiaInstanceType (instanceType ):
319+ return amiType .X86Nvidia
320+ case instanceutils .IsNeuronInstanceType (instanceType ):
321+ return amiType .X86Neuron
317322 default :
318323 return amiType .X86x64
319324 }
0 commit comments