Skip to content

Commit 19aaece

Browse files
authored
Add support for Ubuntu Pro 20.04 based EKS images (#8317)
1 parent 4f2814a commit 19aaece

File tree

14 files changed

+180
-24
lines changed

14 files changed

+180
-24
lines changed

integration/tests/custom_ami/custom_ami_test.go

+31
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ var (
4242
customAMIAL2 string
4343
customAMIAL2023 string
4444
customAMIBottlerocket string
45+
customAMIUbuntuPro2004 string
4546
customAMIUbuntuPro2204 string
4647
customAMIUbuntuPro2404 string
4748
)
@@ -80,6 +81,14 @@ var _ = BeforeSuite(func() {
8081
Expect(err).NotTo(HaveOccurred())
8182
customAMIBottlerocket = *output.Parameter.Value
8283

84+
// retrieve Ubuntu Pro 20.04 AMI
85+
input = &awsssm.GetParameterInput{
86+
Name: aws.String(fmt.Sprintf("/aws/service/canonical/ubuntu/eks-pro/20.04/%s/stable/current/amd64/hvm/ebs-gp2/ami-id", params.Version)),
87+
}
88+
output, err = ssm.GetParameter(context.Background(), input)
89+
Expect(err).NotTo(HaveOccurred())
90+
customAMIUbuntuPro2004 = *output.Parameter.Value
91+
8392
// retrieve Ubuntu Pro 22.04 AMI
8493
input = &awsssm.GetParameterInput{
8594
Name: aws.String(fmt.Sprintf("/aws/service/canonical/ubuntu/eks-pro/22.04/%s/stable/current/amd64/hvm/ebs-gp2/ami-id", params.Version)),
@@ -174,6 +183,28 @@ var _ = Describe("(Integration) [Test Custom AMI]", func() {
174183

175184
})
176185

186+
Context("ubuntu-pro-2004 un-managed nodegroups", func() {
187+
188+
It("can create a working nodegroup which can join the cluster", func() {
189+
By(fmt.Sprintf("using the following EKS optimised AMI: %s", customAMIUbuntuPro2004))
190+
content, err := os.ReadFile(filepath.Join("testdata/ubuntu-pro-2004.yaml"))
191+
Expect(err).NotTo(HaveOccurred())
192+
content = bytes.ReplaceAll(content, []byte("<generated>"), []byte(params.ClusterName))
193+
content = bytes.ReplaceAll(content, []byte("<generated-region>"), []byte(params.Region))
194+
content = bytes.ReplaceAll(content, []byte("<generated-ami>"), []byte(customAMIUbuntuPro2204))
195+
cmd := params.EksctlCreateCmd.
196+
WithArgs(
197+
"nodegroup",
198+
"--config-file", "-",
199+
"--verbose", "4",
200+
).
201+
WithoutArg("--region", params.Region).
202+
WithStdin(bytes.NewReader(content))
203+
Expect(cmd).To(RunSuccessfully())
204+
})
205+
206+
})
207+
177208
Context("ubuntu-pro-2204 un-managed nodegroups", func() {
178209

179210
It("can create a working nodegroup which can join the cluster", func() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: eksctl.io/v1alpha5
2+
kind: ClusterConfig
3+
4+
# name is generated
5+
metadata:
6+
name: <generated>
7+
region: <generated-region>
8+
9+
nodeGroups:
10+
- name: unm-ubuntu-pro-2004
11+
ami: <generated-ami>
12+
amiFamily: UbuntuPro2004
13+
desiredCapacity: 1
14+
overrideBootstrapCommand: |
15+
#!/bin/bash
16+
source /var/lib/cloud/scripts/eksctl/bootstrap.helper.sh
17+
/etc/eks/bootstrap.sh <generated> --kubelet-extra-args "--node-labels=${NODE_LABELS}"

pkg/ami/auto_resolver.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ func MakeImageSearchPatterns(version string) map[string]map[int]string {
4343
ImageClassGeneral: fmt.Sprintf("ubuntu-eks-pro/k8s_%s/images/*22.04-amd64*", version),
4444
ImageClassARM: fmt.Sprintf("ubuntu-eks-pro/k8s_%s/images/*22.04-arm64*", version),
4545
},
46+
api.NodeImageFamilyUbuntuPro2004: {
47+
ImageClassGeneral: fmt.Sprintf("ubuntu-eks-pro/k8s_%s/images/*20.04-amd64*", version),
48+
ImageClassARM: fmt.Sprintf("ubuntu-eks-pro/k8s_%s/images/*20.04-arm64*", version),
49+
},
4650
api.NodeImageFamilyUbuntu2404: {
4751
ImageClassGeneral: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*24.04-amd64*", version),
4852
ImageClassARM: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*24.04-arm64*", version),
@@ -76,7 +80,7 @@ func MakeImageSearchPatterns(version string) map[string]map[int]string {
7680
// OwnerAccountID returns the AWS account ID that owns worker AMI.
7781
func OwnerAccountID(imageFamily, region string) (string, error) {
7882
switch imageFamily {
79-
case api.NodeImageFamilyUbuntuPro2404, api.NodeImageFamilyUbuntu2404, api.NodeImageFamilyUbuntuPro2204, api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu1804:
83+
case api.NodeImageFamilyUbuntuPro2404, api.NodeImageFamilyUbuntu2404, api.NodeImageFamilyUbuntuPro2204, api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntuPro2004, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu1804:
8084
return ownerIDUbuntuFamily, nil
8185
case api.NodeImageFamilyAmazonLinux2023, api.NodeImageFamilyAmazonLinux2:
8286
return api.EKSResourceAccountID(region), nil

pkg/ami/auto_resolver_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ var _ = Describe("AMI Auto Resolution", func() {
6262
Expect(ownerAccount).To(BeEquivalentTo("099720109477"))
6363
Expect(err).NotTo(HaveOccurred())
6464
})
65+
It("should return the Ubuntu Account ID for Ubuntu images", func() {
66+
ownerAccount, err := OwnerAccountID(api.NodeImageFamilyUbuntuPro2004, region)
67+
Expect(ownerAccount).To(BeEquivalentTo("099720109477"))
68+
Expect(err).NotTo(HaveOccurred())
69+
})
6570
It("should return the Ubuntu Account ID for Ubuntu images", func() {
6671
ownerAccount, err := OwnerAccountID(api.NodeImageFamilyUbuntu2204, region)
6772
Expect(ownerAccount).To(BeEquivalentTo("099720109477"))

pkg/ami/ssm_resolver.go

+22-2
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ func MakeSSMParameterName(version, instanceType, imageFamily string) (string, er
7676
case api.NodeImageFamilyUbuntu1804:
7777
return "", &UnsupportedQueryError{msg: fmt.Sprintf("SSM Parameter lookups for %s AMIs is not supported", imageFamily)}
7878
case api.NodeImageFamilyUbuntu2004,
79+
api.NodeImageFamilyUbuntuPro2004,
7980
api.NodeImageFamilyUbuntu2204,
8081
api.NodeImageFamilyUbuntuPro2204:
8182
if err := validateVersionForUbuntu(version, imageFamily); err != nil {
8283
return "", err
8384
}
8485
eksProduct := "eks"
85-
if imageFamily == api.NodeImageFamilyUbuntuPro2204 {
86+
if imageFamily == api.NodeImageFamilyUbuntuPro2004 || imageFamily == api.NodeImageFamilyUbuntuPro2204 {
8687
eksProduct = "eks-pro"
8788
}
8889
return fmt.Sprint("/aws/service/canonical/ubuntu/", eksProduct, "/", ubuntuReleaseName(imageFamily), "/", version, "/stable/current/", ubuntuArchName(instanceType), "/hvm/ebs-gp2/ami-id"), nil
@@ -183,7 +184,7 @@ func windowsAmiType(imageFamily string) string {
183184

184185
func ubuntuReleaseName(imageFamily string) string {
185186
switch imageFamily {
186-
case api.NodeImageFamilyUbuntu2004:
187+
case api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntuPro2004:
187188
return "20.04"
188189
case api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntuPro2204:
189190
return "22.04"
@@ -215,6 +216,25 @@ func validateVersionForUbuntu(version, imageFamily string) error {
215216
if !supportsUbuntu {
216217
return &UnsupportedQueryError{msg: fmt.Sprintf("%s requires EKS version greater or equal than %s and lower than %s", imageFamily, minVersion, maxVersion)}
217218
}
219+
case api.NodeImageFamilyUbuntuPro2004:
220+
var err error
221+
supportsUbuntu := false
222+
const minVersion = api.Version1_27
223+
const maxVersion = api.Version1_29
224+
supportsUbuntu, err = utils.IsMinVersion(minVersion, version)
225+
if err != nil {
226+
return err
227+
}
228+
if !supportsUbuntu {
229+
return &UnsupportedQueryError{msg: fmt.Sprintf("%s requires EKS version greater or equal than %s and lower than %s", imageFamily, minVersion, maxVersion)}
230+
}
231+
supportsUbuntu, err = utils.IsMinVersion(version, maxVersion)
232+
if err != nil {
233+
return err
234+
}
235+
if !supportsUbuntu {
236+
return &UnsupportedQueryError{msg: fmt.Sprintf("%s requires EKS version greater or equal than %s and lower than %s", imageFamily, minVersion, maxVersion)}
237+
}
218238
case api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntuPro2204:
219239
var err error
220240
supportsUbuntu := false

pkg/ami/ssm_resolver_test.go

+60
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,66 @@ var _ = Describe("AMI Auto Resolution", func() {
323323
})
324324
})
325325

326+
Context("and UbuntuPro2004 family", func() {
327+
BeforeEach(func() {
328+
p = mockprovider.NewMockProvider()
329+
instanceType = "t2.medium"
330+
imageFamily = "UbuntuPro2004"
331+
})
332+
333+
DescribeTable("should return an error",
334+
func(version string) {
335+
resolver := NewSSMResolver(p.MockSSM())
336+
resolvedAmi, err = resolver.Resolve(context.Background(), region, version, instanceType, imageFamily)
337+
338+
Expect(err).To(HaveOccurred())
339+
Expect(err).To(MatchError("UbuntuPro2004 requires EKS version greater or equal than 1.27 and lower than 1.29"))
340+
},
341+
EntryDescription("When EKS version is %s"),
342+
Entry(nil, "1.26"),
343+
Entry(nil, "1.30"),
344+
)
345+
346+
DescribeTable("should return a valid AMI",
347+
func(version string) {
348+
addMockGetParameter(p, fmt.Sprintf("/aws/service/canonical/ubuntu/eks-pro/20.04/%s/stable/current/amd64/hvm/ebs-gp2/ami-id", version), expectedAmi)
349+
350+
resolver := NewSSMResolver(p.MockSSM())
351+
resolvedAmi, err = resolver.Resolve(context.Background(), region, version, instanceType, imageFamily)
352+
353+
Expect(err).NotTo(HaveOccurred())
354+
Expect(p.MockSSM().AssertNumberOfCalls(GinkgoT(), "GetParameter", 1)).To(BeTrue())
355+
Expect(resolvedAmi).To(BeEquivalentTo(expectedAmi))
356+
},
357+
EntryDescription("When EKS version is %s"),
358+
Entry(nil, "1.27"),
359+
Entry(nil, "1.28"),
360+
Entry(nil, "1.29"),
361+
)
362+
363+
Context("for arm instance type", func() {
364+
BeforeEach(func() {
365+
instanceType = "c6g.12xlarge"
366+
})
367+
DescribeTable("should return a valid AMI for arm64",
368+
func(version string) {
369+
addMockGetParameter(p, fmt.Sprintf("/aws/service/canonical/ubuntu/eks-pro/20.04/%s/stable/current/arm64/hvm/ebs-gp2/ami-id", version), expectedAmi)
370+
371+
resolver := NewSSMResolver(p.MockSSM())
372+
resolvedAmi, err = resolver.Resolve(context.Background(), region, version, instanceType, imageFamily)
373+
374+
Expect(err).NotTo(HaveOccurred())
375+
Expect(p.MockSSM().AssertNumberOfCalls(GinkgoT(), "GetParameter", 1)).To(BeTrue())
376+
Expect(resolvedAmi).To(BeEquivalentTo(expectedAmi))
377+
},
378+
EntryDescription("When EKS version is %s"),
379+
Entry(nil, "1.27"),
380+
Entry(nil, "1.28"),
381+
Entry(nil, "1.29"),
382+
)
383+
})
384+
})
385+
326386
Context("and Ubuntu2204 family", func() {
327387
BeforeEach(func() {
328388
p = mockprovider.NewMockProvider()

pkg/apis/eksctl.io/v1alpha5/assets/schema.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -1386,8 +1386,8 @@
13861386
},
13871387
"amiFamily": {
13881388
"type": "string",
1389-
"description": "Valid variants are: `\"AmazonLinux2\"` (default), `\"AmazonLinux2023\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"Ubuntu2004\"`, `\"Ubuntu1804\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
1390-
"x-intellij-html-description": "Valid variants are: <code>&quot;AmazonLinux2&quot;</code> (default), <code>&quot;AmazonLinux2023&quot;</code>, <code>&quot;UbuntuPro2404&quot;</code>, <code>&quot;Ubuntu2404&quot;</code>, <code>&quot;UbuntuPro2204&quot;</code>, <code>&quot;Ubuntu2204&quot;</code>, <code>&quot;Ubuntu2004&quot;</code>, <code>&quot;Ubuntu1804&quot;</code>, <code>&quot;Bottlerocket&quot;</code>, <code>&quot;WindowsServer2019CoreContainer&quot;</code>, <code>&quot;WindowsServer2019FullContainer&quot;</code>, <code>&quot;WindowsServer2022CoreContainer&quot;</code>, <code>&quot;WindowsServer2022FullContainer&quot;</code>.",
1389+
"description": "Valid variants are: `\"AmazonLinux2\"` (default), `\"AmazonLinux2023\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Ubuntu2004\"`, `\"Ubuntu1804\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
1390+
"x-intellij-html-description": "Valid variants are: <code>&quot;AmazonLinux2&quot;</code> (default), <code>&quot;AmazonLinux2023&quot;</code>, <code>&quot;UbuntuPro2404&quot;</code>, <code>&quot;Ubuntu2404&quot;</code>, <code>&quot;UbuntuPro2204&quot;</code>, <code>&quot;Ubuntu2204&quot;</code>, <code>&quot;UbuntuPro2004&quot;</code>, <code>&quot;Ubuntu2004&quot;</code>, <code>&quot;Ubuntu1804&quot;</code>, <code>&quot;Bottlerocket&quot;</code>, <code>&quot;WindowsServer2019CoreContainer&quot;</code>, <code>&quot;WindowsServer2019FullContainer&quot;</code>, <code>&quot;WindowsServer2022CoreContainer&quot;</code>, <code>&quot;WindowsServer2022FullContainer&quot;</code>.",
13911391
"default": "AmazonLinux2",
13921392
"enum": [
13931393
"AmazonLinux2",
@@ -1396,6 +1396,7 @@
13961396
"Ubuntu2404",
13971397
"UbuntuPro2204",
13981398
"Ubuntu2204",
1399+
"UbuntuPro2004",
13991400
"Ubuntu2004",
14001401
"Ubuntu1804",
14011402
"Bottlerocket",
@@ -1736,8 +1737,8 @@
17361737
},
17371738
"amiFamily": {
17381739
"type": "string",
1739-
"description": "Valid variants are: `\"AmazonLinux2\"` (default), `\"AmazonLinux2023\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"Ubuntu2004\"`, `\"Ubuntu1804\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
1740-
"x-intellij-html-description": "Valid variants are: <code>&quot;AmazonLinux2&quot;</code> (default), <code>&quot;AmazonLinux2023&quot;</code>, <code>&quot;UbuntuPro2404&quot;</code>, <code>&quot;Ubuntu2404&quot;</code>, <code>&quot;UbuntuPro2204&quot;</code>, <code>&quot;Ubuntu2204&quot;</code>, <code>&quot;Ubuntu2004&quot;</code>, <code>&quot;Ubuntu1804&quot;</code>, <code>&quot;Bottlerocket&quot;</code>, <code>&quot;WindowsServer2019CoreContainer&quot;</code>, <code>&quot;WindowsServer2019FullContainer&quot;</code>, <code>&quot;WindowsServer2022CoreContainer&quot;</code>, <code>&quot;WindowsServer2022FullContainer&quot;</code>.",
1740+
"description": "Valid variants are: `\"AmazonLinux2\"` (default), `\"AmazonLinux2023\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Ubuntu2004\"`, `\"Ubuntu1804\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
1741+
"x-intellij-html-description": "Valid variants are: <code>&quot;AmazonLinux2&quot;</code> (default), <code>&quot;AmazonLinux2023&quot;</code>, <code>&quot;UbuntuPro2404&quot;</code>, <code>&quot;Ubuntu2404&quot;</code>, <code>&quot;UbuntuPro2204&quot;</code>, <code>&quot;Ubuntu2204&quot;</code>, <code>&quot;UbuntuPro2004&quot;</code>, <code>&quot;Ubuntu2004&quot;</code>, <code>&quot;Ubuntu1804&quot;</code>, <code>&quot;Bottlerocket&quot;</code>, <code>&quot;WindowsServer2019CoreContainer&quot;</code>, <code>&quot;WindowsServer2019FullContainer&quot;</code>, <code>&quot;WindowsServer2022CoreContainer&quot;</code>, <code>&quot;WindowsServer2022FullContainer&quot;</code>.",
17411742
"default": "AmazonLinux2",
17421743
"enum": [
17431744
"AmazonLinux2",
@@ -1746,6 +1747,7 @@
17461747
"Ubuntu2404",
17471748
"UbuntuPro2204",
17481749
"Ubuntu2204",
1750+
"UbuntuPro2004",
17491751
"Ubuntu2004",
17501752
"Ubuntu1804",
17511753
"Bottlerocket",

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

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ var _ = Describe("Outposts validation", func() {
208208
Entry("Bottlerocket", api.NodeImageFamilyBottlerocket, true),
209209
Entry("Ubuntu1804", api.NodeImageFamilyUbuntu1804, true),
210210
Entry("Ubuntu2004", api.NodeImageFamilyUbuntu2004, true),
211+
Entry("UbuntuPro2004", api.NodeImageFamilyUbuntuPro2004, true),
211212
Entry("Ubuntu2204", api.NodeImageFamilyUbuntu2204, true),
212213
Entry("UbuntuPro2204", api.NodeImageFamilyUbuntuPro2204, true),
213214
Entry("Ubuntu2404", api.NodeImageFamilyUbuntuPro2204, true),

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

+2
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ const (
201201
NodeImageFamilyUbuntu2404 = "Ubuntu2404"
202202
NodeImageFamilyUbuntuPro2204 = "UbuntuPro2204"
203203
NodeImageFamilyUbuntu2204 = "Ubuntu2204"
204+
NodeImageFamilyUbuntuPro2004 = "UbuntuPro2004"
204205
NodeImageFamilyUbuntu2004 = "Ubuntu2004"
205206
NodeImageFamilyUbuntu1804 = "Ubuntu1804"
206207
NodeImageFamilyBottlerocket = "Bottlerocket"
@@ -556,6 +557,7 @@ func SupportedAMIFamilies() []string {
556557
NodeImageFamilyUbuntu2404,
557558
NodeImageFamilyUbuntuPro2204,
558559
NodeImageFamilyUbuntu2204,
560+
NodeImageFamilyUbuntuPro2004,
559561
NodeImageFamilyUbuntu2004,
560562
NodeImageFamilyUbuntu1804,
561563
NodeImageFamilyBottlerocket,

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

+1
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,7 @@ func IsUbuntuImage(imageFamily string) bool {
16261626
NodeImageFamilyUbuntu2404,
16271627
NodeImageFamilyUbuntuPro2204,
16281628
NodeImageFamilyUbuntu2204,
1629+
NodeImageFamilyUbuntuPro2004,
16291630
NodeImageFamilyUbuntu2004,
16301631
NodeImageFamilyUbuntu1804:
16311632
return true

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

+4
Original file line numberDiff line numberDiff line change
@@ -2262,6 +2262,10 @@ var _ = Describe("ClusterConfig validation", func() {
22622262
err = api.ValidateManagedNodeGroup(0, mng)
22632263
Expect(err).NotTo(HaveOccurred())
22642264

2265+
mng.AMIFamily = api.NodeImageFamilyUbuntuPro2004
2266+
err = api.ValidateManagedNodeGroup(0, mng)
2267+
Expect(err).NotTo(HaveOccurred())
2268+
22652269
mng.AMIFamily = api.NodeImageFamilyUbuntu2204
22662270
err = api.ValidateManagedNodeGroup(0, mng)
22672271
Expect(err).NotTo(HaveOccurred())

pkg/eks/api_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@ var _ = Describe("eksctl API", func() {
308308
testEnsureAMI(Equal("ami-ubuntu"), "1.29")
309309
})
310310

311+
It("should fall back to auto resolution for UbuntuPro2004", func() {
312+
ng.AMIFamily = api.NodeImageFamilyUbuntuPro2004
313+
mockDescribeImages(provider, "ami-ubuntu", func(input *ec2.DescribeImagesInput) bool {
314+
return input.Owners[0] == "099720109477"
315+
})
316+
testEnsureAMI(Equal("ami-ubuntu"), "1.14")
317+
})
318+
311319
It("should fall back to auto resolution for Ubuntu2204", func() {
312320
ng.AMIFamily = api.NodeImageFamilyUbuntu2204
313321
mockDescribeImages(provider, "ami-ubuntu", func(input *ec2.DescribeImagesInput) bool {

pkg/nodebootstrap/userdata.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func NewBootstrapper(clusterConfig *api.ClusterConfig, ng *api.NodeGroup) (Boots
4646
return NewWindowsBootstrapper(clusterConfig, ng, clusterDNS), nil
4747
}
4848
switch ng.AMIFamily {
49-
case api.NodeImageFamilyUbuntuPro2404, api.NodeImageFamilyUbuntu2404, api.NodeImageFamilyUbuntuPro2204, api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu1804:
49+
case api.NodeImageFamilyUbuntuPro2404, api.NodeImageFamilyUbuntu2404, api.NodeImageFamilyUbuntuPro2204, api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntuPro2004, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu1804:
5050
return NewUbuntuBootstrapper(clusterConfig, ng, clusterDNS), nil
5151
case api.NodeImageFamilyBottlerocket:
5252
return NewBottlerocketBootstrapper(clusterConfig, ng), nil
@@ -78,7 +78,7 @@ func NewManagedBootstrapper(clusterConfig *api.ClusterConfig, ng *api.ManagedNod
7878
return NewManagedAL2Bootstrapper(ng), nil
7979
case api.NodeImageFamilyBottlerocket:
8080
return NewManagedBottlerocketBootstrapper(clusterConfig, ng), nil
81-
case api.NodeImageFamilyUbuntu1804, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntuPro2204, api.NodeImageFamilyUbuntu2404, api.NodeImageFamilyUbuntuPro2404:
81+
case api.NodeImageFamilyUbuntu1804, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntuPro2004, api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntuPro2204, api.NodeImageFamilyUbuntu2404, api.NodeImageFamilyUbuntuPro2404:
8282
return NewUbuntuBootstrapper(clusterConfig, ng, clusterDNS), nil
8383
}
8484
return nil, nil

0 commit comments

Comments
 (0)