Skip to content

Commit fe8c7bc

Browse files
committed
Drop support for Ubuntu 20.04 images
Ubuntu 20.04 (Focal Fossa) reached end-of-life on May 31, 2025. Discontinue support for this EOL release.
1 parent 9a2acef commit fe8c7bc

File tree

17 files changed

+20
-184
lines changed

17 files changed

+20
-184
lines changed

integration/tests/managed/managed_nodegroup_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,6 @@ var _ = Describe("(Integration) Create Managed Nodegroups", func() {
131131
"--dry-run",
132132
},
133133
}),
134-
135-
Entry("Ubuntu with dry-run", managedCLIEntry{
136-
createArgs: []string{
137-
"--node-ami-family=Ubuntu2004",
138-
"--dry-run",
139-
},
140-
}),
141134
)
142135

143136
Context("adding new managed nodegroups", func() {

pkg/ami/auto_resolver.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ func MakeImageSearchPatterns(version string) map[string]map[int]string {
5555
ImageClassGeneral: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*22.04-amd64*", version),
5656
ImageClassARM: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*22.04-arm64*", version),
5757
},
58-
api.NodeImageFamilyUbuntu2004: {
59-
ImageClassGeneral: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*20.04-amd64*", version),
60-
ImageClassARM: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*20.04-arm64*", version),
61-
},
6258
api.NodeImageFamilyWindowsServer2019CoreContainer: {
6359
ImageClassGeneral: fmt.Sprintf("Windows_Server-2019-English-Core-EKS_Optimized-%v-*", version),
6460
},
@@ -77,7 +73,7 @@ func MakeImageSearchPatterns(version string) map[string]map[int]string {
7773
// OwnerAccountID returns the AWS account ID that owns worker AMI.
7874
func OwnerAccountID(imageFamily, region string) (string, error) {
7975
switch imageFamily {
80-
case api.NodeImageFamilyUbuntuPro2404, api.NodeImageFamilyUbuntu2404, api.NodeImageFamilyUbuntuPro2204, api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntuPro2004, api.NodeImageFamilyUbuntu2004:
76+
case api.NodeImageFamilyUbuntuPro2404, api.NodeImageFamilyUbuntu2404, api.NodeImageFamilyUbuntuPro2204, api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntuPro2004:
8177
return ownerIDUbuntuFamily, nil
8278
case api.NodeImageFamilyAmazonLinux2023, api.NodeImageFamilyAmazonLinux2:
8379
return api.EKSResourceAccountID(region), nil

pkg/ami/ssm_resolver.go

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ func MakeSSMParameterName(version, instanceType, imageFamily string) (string, er
7373
return fmt.Sprintf("/aws/service/ami-windows-latest/Windows_Server-2022-English-%s-EKS_Optimized-%s/%s", windowsAmiType(imageFamily), version, fieldName), nil
7474
case api.NodeImageFamilyBottlerocket:
7575
return fmt.Sprintf("/aws/service/bottlerocket/aws-k8s-%s/%s/latest/%s", imageType(imageFamily, instanceType, version), instanceEC2ArchName(instanceType), fieldName), nil
76-
case api.NodeImageFamilyUbuntu2004,
77-
api.NodeImageFamilyUbuntuPro2004,
76+
case api.NodeImageFamilyUbuntuPro2004,
7877
api.NodeImageFamilyUbuntu2204,
7978
api.NodeImageFamilyUbuntuPro2204:
8079
if err := validateVersionForUbuntu(version, imageFamily); err != nil {
@@ -184,7 +183,7 @@ func windowsAmiType(imageFamily string) string {
184183

185184
func ubuntuReleaseName(imageFamily string) string {
186185
switch imageFamily {
187-
case api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntuPro2004:
186+
case api.NodeImageFamilyUbuntuPro2004:
188187
return "20.04"
189188
case api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntuPro2204:
190189
return "22.04"
@@ -197,25 +196,6 @@ func ubuntuReleaseName(imageFamily string) string {
197196

198197
func validateVersionForUbuntu(version, imageFamily string) error {
199198
switch imageFamily {
200-
case api.NodeImageFamilyUbuntu2004:
201-
var err error
202-
supportsUbuntu := false
203-
const minVersion = api.Version1_21
204-
const maxVersion = api.Version1_29
205-
supportsUbuntu, err = utils.IsMinVersion(minVersion, version)
206-
if err != nil {
207-
return err
208-
}
209-
if !supportsUbuntu {
210-
return &UnsupportedQueryError{msg: fmt.Sprintf("%s requires EKS version greater or equal than %s and lower than %s", imageFamily, minVersion, maxVersion)}
211-
}
212-
supportsUbuntu, err = utils.IsMinVersion(version, maxVersion)
213-
if err != nil {
214-
return err
215-
}
216-
if !supportsUbuntu {
217-
return &UnsupportedQueryError{msg: fmt.Sprintf("%s requires EKS version greater or equal than %s and lower than %s", imageFamily, minVersion, maxVersion)}
218-
}
219199
case api.NodeImageFamilyUbuntuPro2004:
220200
var err error
221201
supportsUbuntu := false

pkg/ami/ssm_resolver_test.go

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -234,78 +234,6 @@ var _ = Describe("AMI Auto Resolution", func() {
234234

235235
})
236236

237-
Context("and Ubuntu2004 family", func() {
238-
BeforeEach(func() {
239-
p = mockprovider.NewMockProvider()
240-
instanceType = "t2.medium"
241-
imageFamily = "Ubuntu2004"
242-
})
243-
244-
DescribeTable("should return an error",
245-
func(version string) {
246-
resolver := NewSSMResolver(p.MockSSM())
247-
resolvedAmi, err = resolver.Resolve(context.Background(), region, version, instanceType, imageFamily)
248-
249-
Expect(err).To(HaveOccurred())
250-
Expect(err).To(MatchError("Ubuntu2004 requires EKS version greater or equal than 1.21 and lower than 1.29"))
251-
},
252-
EntryDescription("When EKS version is %s"),
253-
Entry(nil, "1.20"),
254-
Entry(nil, "1.30"),
255-
)
256-
257-
DescribeTable("should return a valid AMI",
258-
func(version string) {
259-
addMockGetParameter(p, fmt.Sprintf("/aws/service/canonical/ubuntu/eks/20.04/%s/stable/current/amd64/hvm/ebs-gp2/ami-id", version), expectedAmi)
260-
261-
resolver := NewSSMResolver(p.MockSSM())
262-
resolvedAmi, err = resolver.Resolve(context.Background(), region, version, instanceType, imageFamily)
263-
264-
Expect(err).NotTo(HaveOccurred())
265-
Expect(p.MockSSM().AssertNumberOfCalls(GinkgoT(), "GetParameter", 1)).To(BeTrue())
266-
Expect(resolvedAmi).To(BeEquivalentTo(expectedAmi))
267-
},
268-
EntryDescription("When EKS version is %s"),
269-
Entry(nil, "1.21"),
270-
Entry(nil, "1.22"),
271-
Entry(nil, "1.23"),
272-
Entry(nil, "1.24"),
273-
Entry(nil, "1.25"),
274-
Entry(nil, "1.26"),
275-
Entry(nil, "1.27"),
276-
Entry(nil, "1.28"),
277-
Entry(nil, "1.29"),
278-
)
279-
280-
Context("for arm instance type", func() {
281-
BeforeEach(func() {
282-
instanceType = "c6g.12xlarge"
283-
})
284-
DescribeTable("should return a valid AMI for arm64",
285-
func(version string) {
286-
addMockGetParameter(p, fmt.Sprintf("/aws/service/canonical/ubuntu/eks/20.04/%s/stable/current/arm64/hvm/ebs-gp2/ami-id", version), expectedAmi)
287-
288-
resolver := NewSSMResolver(p.MockSSM())
289-
resolvedAmi, err = resolver.Resolve(context.Background(), region, version, instanceType, imageFamily)
290-
291-
Expect(err).NotTo(HaveOccurred())
292-
Expect(p.MockSSM().AssertNumberOfCalls(GinkgoT(), "GetParameter", 1)).To(BeTrue())
293-
Expect(resolvedAmi).To(BeEquivalentTo(expectedAmi))
294-
},
295-
EntryDescription("When EKS version is %s"),
296-
Entry(nil, "1.21"),
297-
Entry(nil, "1.22"),
298-
Entry(nil, "1.23"),
299-
Entry(nil, "1.24"),
300-
Entry(nil, "1.25"),
301-
Entry(nil, "1.26"),
302-
Entry(nil, "1.27"),
303-
Entry(nil, "1.28"),
304-
Entry(nil, "1.29"),
305-
)
306-
})
307-
})
308-
309237
Context("and UbuntuPro2004 family", func() {
310238
BeforeEach(func() {
311239
p = mockprovider.NewMockProvider()

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,9 +1432,9 @@
14321432
},
14331433
"amiFamily": {
14341434
"type": "string",
1435-
"description": "Valid variants are: `\"AmazonLinux2023\"` (default), `\"AmazonLinux2\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Ubuntu2004\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
1436-
"x-intellij-html-description": "Valid variants are: <code>&quot;AmazonLinux2023&quot;</code> (default), <code>&quot;AmazonLinux2&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;Bottlerocket&quot;</code>, <code>&quot;WindowsServer2019CoreContainer&quot;</code>, <code>&quot;WindowsServer2019FullContainer&quot;</code>, <code>&quot;WindowsServer2022CoreContainer&quot;</code>, <code>&quot;WindowsServer2022FullContainer&quot;</code>.",
1437-
"default": "AmazonLinux2023",
1435+
"description": "Valid variants are: `\"AmazonLinux2\"` (default), `\"AmazonLinux2023\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
1436+
"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;Bottlerocket&quot;</code>, <code>&quot;WindowsServer2019CoreContainer&quot;</code>, <code>&quot;WindowsServer2019FullContainer&quot;</code>, <code>&quot;WindowsServer2022CoreContainer&quot;</code>, <code>&quot;WindowsServer2022FullContainer&quot;</code>.",
1437+
"default": "AmazonLinux2",
14381438
"enum": [
14391439
"AmazonLinux2023",
14401440
"AmazonLinux2",
@@ -1443,7 +1443,6 @@
14431443
"UbuntuPro2204",
14441444
"Ubuntu2204",
14451445
"UbuntuPro2004",
1446-
"Ubuntu2004",
14471446
"Bottlerocket",
14481447
"WindowsServer2019CoreContainer",
14491448
"WindowsServer2019FullContainer",
@@ -1782,9 +1781,10 @@
17821781
},
17831782
"amiFamily": {
17841783
"type": "string",
1785-
"description": "Valid variants are: `\"AmazonLinux2023\"` (default), `\"AmazonLinux2\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Ubuntu2004\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
1786-
"x-intellij-html-description": "Valid variants are: <code>&quot;AmazonLinux2023&quot;</code> (default), <code>&quot;AmazonLinux2&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;Bottlerocket&quot;</code>, <code>&quot;WindowsServer2019CoreContainer&quot;</code>, <code>&quot;WindowsServer2019FullContainer&quot;</code>, <code>&quot;WindowsServer2022CoreContainer&quot;</code>, <code>&quot;WindowsServer2022FullContainer&quot;</code>.",
1787-
"default": "AmazonLinux2023",
1784+
"default": "AmazonLinux2",
1785+
"description": "Valid variants are: `\"AmazonLinux2\"` (default), `\"AmazonLinux2023\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
1786+
"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;Bottlerocket&quot;</code>, <code>&quot;WindowsServer2019CoreContainer&quot;</code>, <code>&quot;WindowsServer2019FullContainer&quot;</code>, <code>&quot;WindowsServer2022CoreContainer&quot;</code>, <code>&quot;WindowsServer2022FullContainer&quot;</code>.",
1787+
"default": "AmazonLinux2",
17881788
"enum": [
17891789
"AmazonLinux2023",
17901790
"AmazonLinux2",
@@ -1793,7 +1793,6 @@
17931793
"UbuntuPro2204",
17941794
"Ubuntu2204",
17951795
"UbuntuPro2004",
1796-
"Ubuntu2004",
17971796
"Bottlerocket",
17981797
"WindowsServer2019CoreContainer",
17991798
"WindowsServer2019FullContainer",

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

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,12 @@ var _ = Describe("GPU instance support", func() {
6767
gpuInstanceType: "g5.12xlarge",
6868
amiFamily: api.NodeImageFamilyAmazonLinux2,
6969
}),
70-
Entry("Ubuntu2004", gpuInstanceEntry{
71-
amiFamily: api.NodeImageFamilyUbuntu2004,
72-
gpuInstanceType: "g4dn.xlarge",
73-
}),
7470
Entry("Ubuntu2204", gpuInstanceEntry{
75-
amiFamily: api.NodeImageFamilyUbuntu2004,
71+
amiFamily: api.NodeImageFamilyUbuntu2204,
7672
gpuInstanceType: "g4dn.xlarge",
7773
}),
7874
Entry("UbuntuPro2204", gpuInstanceEntry{
79-
amiFamily: api.NodeImageFamilyUbuntu2004,
75+
amiFamily: api.NodeImageFamilyUbuntuPro2204,
8076
gpuInstanceType: "g4dn.xlarge",
8177
}),
8278
Entry("Bottlerocket INF", gpuInstanceEntry{
@@ -164,8 +160,8 @@ var _ = Describe("GPU instance support", func() {
164160
amiFamily: api.NodeImageFamilyBottlerocket,
165161
gpuInstanceType: "g4dn.xlarge",
166162
}),
167-
Entry("Ubuntu2004", gpuInstanceEntry{
168-
amiFamily: api.NodeImageFamilyUbuntu2004,
163+
Entry("UbuntuPro2004", gpuInstanceEntry{
164+
amiFamily: api.NodeImageFamilyUbuntuPro2004,
169165
gpuInstanceType: "g4dn.xlarge",
170166
}),
171167
Entry("Windows2019Core", gpuInstanceEntry{
@@ -218,13 +214,6 @@ var _ = Describe("GPU instance support", func() {
218214
Expect(output.String()).NotTo(ContainSubstring(api.GPUDriversWarning(mng.AMIFamily)))
219215
}
220216
},
221-
Entry("Windows without GPU instances", gpuInstanceEntry{
222-
amiFamily: api.NodeImageFamilyUbuntu2004,
223-
instanceSelector: &api.InstanceSelector{
224-
VCPUs: 4,
225-
GPUs: newInt(0),
226-
},
227-
}),
228217
Entry("Windows with explicit GPU instance", gpuInstanceEntry{
229218
amiFamily: api.NodeImageFamilyWindowsServer2019FullContainer,
230219
gpuInstanceType: "g4dn.xlarge",
@@ -237,14 +226,6 @@ var _ = Describe("GPU instance support", func() {
237226
},
238227
expectWarning: true,
239228
}),
240-
Entry("Ubuntu with implicit GPU instance", gpuInstanceEntry{
241-
amiFamily: api.NodeImageFamilyUbuntu2004,
242-
instanceSelector: &api.InstanceSelector{
243-
VCPUs: 4,
244-
GPUs: newInt(2),
245-
},
246-
expectWarning: true,
247-
}),
248229
)
249230

250231
Describe("No GPU instance type support validation for custom AMI", func() {
@@ -272,7 +253,6 @@ var _ = Describe("GPU instance support", func() {
272253
},
273254
Entry("AmazonLinux2", api.NodeImageFamilyAmazonLinux2, true),
274255
Entry("AmazonLinux2023", api.NodeImageFamilyAmazonLinux2023, false),
275-
Entry("Ubuntu2004", api.NodeImageFamilyUbuntu2004, false),
276256
Entry("Windows2019Full", api.NodeImageFamilyWindowsServer2019FullContainer, true),
277257
Entry("Windows2019Core", api.NodeImageFamilyWindowsServer2019CoreContainer, true),
278258
Entry("Bottlerocket", api.NodeImageFamilyBottlerocket, false),

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ var _ = Describe("Outposts validation", func() {
206206
},
207207
Entry("AmazonLinux2", api.NodeImageFamilyAmazonLinux2, false),
208208
Entry("Bottlerocket", api.NodeImageFamilyBottlerocket, true),
209-
Entry("Ubuntu2004", api.NodeImageFamilyUbuntu2004, true),
210209
Entry("UbuntuPro2004", api.NodeImageFamilyUbuntuPro2004, true),
211210
Entry("Ubuntu2204", api.NodeImageFamilyUbuntu2204, true),
212211
Entry("UbuntuPro2204", api.NodeImageFamilyUbuntuPro2204, true),

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ const (
212212
NodeImageFamilyUbuntuPro2204 = "UbuntuPro2204"
213213
NodeImageFamilyUbuntu2204 = "Ubuntu2204"
214214
NodeImageFamilyUbuntuPro2004 = "UbuntuPro2004"
215-
NodeImageFamilyUbuntu2004 = "Ubuntu2004"
216215
NodeImageFamilyBottlerocket = "Bottlerocket"
217216

218217
NodeImageFamilyWindowsServer2019CoreContainer = "WindowsServer2019CoreContainer"
@@ -585,7 +584,6 @@ func SupportedAMIFamilies() []string {
585584
NodeImageFamilyUbuntuPro2204,
586585
NodeImageFamilyUbuntu2204,
587586
NodeImageFamilyUbuntuPro2004,
588-
NodeImageFamilyUbuntu2004,
589587
NodeImageFamilyBottlerocket,
590588
NodeImageFamilyWindowsServer2019CoreContainer,
591589
NodeImageFamilyWindowsServer2019FullContainer,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,6 @@ func IsUbuntuImage(imageFamily string) bool {
16601660
NodeImageFamilyUbuntuPro2204,
16611661
NodeImageFamilyUbuntu2204,
16621662
NodeImageFamilyUbuntuPro2004,
1663-
NodeImageFamilyUbuntu2004:
16641663
return true
16651664

16661665
default:

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,10 +2254,6 @@ var _ = Describe("ClusterConfig validation", func() {
22542254
err := api.ValidateManagedNodeGroup(0, mng)
22552255
Expect(err).NotTo(HaveOccurred())
22562256

2257-
mng.AMIFamily = api.NodeImageFamilyUbuntu2004
2258-
err = api.ValidateManagedNodeGroup(0, mng)
2259-
Expect(err).NotTo(HaveOccurred())
2260-
22612257
mng.AMIFamily = api.NodeImageFamilyUbuntuPro2004
22622258
err = api.ValidateManagedNodeGroup(0, mng)
22632259
Expect(err).NotTo(HaveOccurred())

0 commit comments

Comments
 (0)