Skip to content

Commit 4586dd8

Browse files
ojunkwonSkarlso
andauthored
Add g5 instance to list of GPU instance types (#4550)
* Add g5 instance to list of GPU instance types * Add test cases for g5 instance Co-authored-by: Gergely Brautigam <[email protected]>
1 parent 8ed86d6 commit 4586dd8

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pkg/apis/eksctl.io/v1alpha5/gpu_validation_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ var _ = Describe("GPU instance support", func() {
3939
gpuInstanceType: "asdf",
4040
amiFamily: api.NodeImageFamilyAmazonLinux2,
4141
}),
42+
Entry("AL2", gpuInstanceEntry{
43+
gpuInstanceType: "g5.12xlarge",
44+
amiFamily: api.NodeImageFamilyAmazonLinux2,
45+
}),
4246
Entry("Bottlerocket", gpuInstanceEntry{
4347
amiFamily: api.NodeImageFamilyBottlerocket,
4448
gpuInstanceType: "g4dn.xlarge",
@@ -62,6 +66,10 @@ var _ = Describe("GPU instance support", func() {
6266
gpuInstanceType: "g4dn.xlarge",
6367
amiFamily: api.NodeImageFamilyAmazonLinux2,
6468
}),
69+
Entry("AL2", gpuInstanceEntry{
70+
gpuInstanceType: "g5.12xlarge",
71+
amiFamily: api.NodeImageFamilyAmazonLinux2,
72+
}),
6573
Entry("AMI unset", gpuInstanceEntry{
6674
gpuInstanceType: "g4dn.xlarge",
6775
}),

pkg/utils/instance/instance.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ func IsGPUInstanceType(instanceType string) bool {
2323
strings.HasPrefix(instanceType, "p4") ||
2424
strings.HasPrefix(instanceType, "g3") ||
2525
strings.HasPrefix(instanceType, "g4") ||
26+
strings.HasPrefix(instanceType, "g5") ||
2627
strings.HasPrefix(instanceType, "inf1")
2728
}
2829

0 commit comments

Comments
 (0)