@@ -249,6 +249,23 @@ var _ = Describe("GPU instance support", func() {
249249 }),
250250 )
251251
252+ Describe ("No GPU instance type support validation for custom AMI" , func () {
253+ amiFamily := api .NodeImageFamilyAmazonLinux2023
254+ instanceType := "g5g.2xlarge"
255+
256+ ngFail := api .NewNodeGroup ()
257+ ngFail .AMIFamily = amiFamily
258+ ngFail .InstanceType = instanceType
259+
260+ ngPass := api .NewNodeGroup ()
261+ ngPass .AMIFamily = amiFamily
262+ ngPass .InstanceType = instanceType
263+ ngPass .AMI = "ami-xxxx"
264+
265+ Expect (api .ValidateNodeGroup (0 , ngFail , api .NewClusterConfig ())).To (HaveOccurred ())
266+ Expect (api .ValidateNodeGroup (0 , ngPass , api .NewClusterConfig ())).NotTo (HaveOccurred ())
267+ })
268+
252269 DescribeTable ("ARM-based GPU instance type support" , func (amiFamily string , expectErr bool ) {
253270 ng := api .NewNodeGroup ()
254271 ng .InstanceType = "g5g.2xlarge"
@@ -261,6 +278,7 @@ var _ = Describe("GPU instance support", func() {
261278 }
262279 },
263280 Entry ("AmazonLinux2" , api .NodeImageFamilyAmazonLinux2 , true ),
281+ Entry ("AmazonLinux2023" , api .NodeImageFamilyAmazonLinux2023 , true ),
264282 Entry ("Ubuntu2004" , api .NodeImageFamilyUbuntu2004 , true ),
265283 Entry ("Ubuntu1804" , api .NodeImageFamilyUbuntu1804 , true ),
266284 Entry ("Windows2019Full" , api .NodeImageFamilyWindowsServer2019FullContainer , true ),
0 commit comments