From 54a247aa4709c2e503950b56f0d380450780ade3 Mon Sep 17 00:00:00 2001 From: yiannistri <8741709+yiannistri@users.noreply.github.com> Date: Thu, 12 Sep 2024 07:29:08 +0100 Subject: [PATCH] Revert "Merge pull request #790 from mjura/gpu-v2.9" This reverts commit bb73bdb6605f0485acd51bda9801ab40ce6e2538, reversing changes made to be21e5dfe36f7abc6508b9bf0005cc3b64a566bd. --- controller/external.go | 5 +++-- pkg/eks/create.go | 2 +- pkg/eks/create_test.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/controller/external.go b/controller/external.go index 730a59c2..bc6089e5 100644 --- a/controller/external.go +++ b/controller/external.go @@ -207,8 +207,9 @@ func BuildUpstreamClusterState(ctx context.Context, name, managedTemplateID stri ngToAdd.Ec2SshKey = ng.Nodegroup.RemoteAccess.Ec2SshKey } } - - if ng.Nodegroup.AmiType == ekstypes.AMITypesAl2023X8664Nvidia { + // TODO: Update AMITypesAl2X8664Gpu to Amazon Linux 2023 when it is available + // Issue https://github.com/rancher/eks-operator/issues/568 + if ng.Nodegroup.AmiType == ekstypes.AMITypesAl2X8664Gpu { ngToAdd.Gpu = aws.Bool(true) } else if ng.Nodegroup.AmiType == ekstypes.AMITypesAl2023X8664Standard { ngToAdd.Gpu = aws.Bool(false) diff --git a/pkg/eks/create.go b/pkg/eks/create.go index 1a1aaec4..85d4835d 100644 --- a/pkg/eks/create.go +++ b/pkg/eks/create.go @@ -282,7 +282,7 @@ func CreateNodeGroup(ctx context.Context, opts *CreateNodeGroupOptions) (string, } else if arm := opts.NodeGroup.Arm; aws.ToBool(arm) { nodeGroupCreateInput.AmiType = ekstypes.AMITypesAl2023Arm64Standard } else if gpu := opts.NodeGroup.Gpu; aws.ToBool(gpu) { - nodeGroupCreateInput.AmiType = ekstypes.AMITypesAl2023X8664Nvidia + nodeGroupCreateInput.AmiType = ekstypes.AMITypesAl2X8664Gpu } else { nodeGroupCreateInput.AmiType = ekstypes.AMITypesAl2023X8664Standard } diff --git a/pkg/eks/create_test.go b/pkg/eks/create_test.go index d6806a52..abdc2a02 100644 --- a/pkg/eks/create_test.go +++ b/pkg/eks/create_test.go @@ -956,7 +956,7 @@ var _ = Describe("CreateNodeGroup", func() { InstanceTypes: createNodeGroupOpts.NodeGroup.SpotInstanceTypes, Subnets: createNodeGroupOpts.NodeGroup.Subnets, NodeRole: aws.String("test"), - AmiType: ekstypes.AMITypesAl2023X8664Nvidia, + AmiType: ekstypes.AMITypesAl2X8664Gpu, }).Return(nil, nil) launchTemplateVersion, generatedNodeRole, err := CreateNodeGroup(ctx, createNodeGroupOpts)