Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/ami/auto_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ func MakeImageSearchPatterns(version string) map[string]map[int]string {
api.NodeImageFamilyWindowsServer2022FullContainer: {
ImageClassGeneral: fmt.Sprintf("Windows_Server-2022-English-Full-EKS_Optimized-%v-*", version),
},
api.NodeImageFamilyWindowsServer2025CoreContainer: {
ImageClassGeneral: fmt.Sprintf("Windows_Server-2025-English-Core-EKS_Optimized-%v-*", version),
},
api.NodeImageFamilyWindowsServer2025FullContainer: {
ImageClassGeneral: fmt.Sprintf("Windows_Server-2025-English-Full-EKS_Optimized-%v-*", version),
},
}
}

Expand Down
11 changes: 11 additions & 0 deletions pkg/ami/ssm_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ func MakeSSMParameterName(version, instanceType, imageFamily string) (string, er
return "", fmt.Errorf("Windows Server 2022 %s requires EKS version %s and above", windowsAmiType(imageFamily), minVersion)
}
return fmt.Sprintf("/aws/service/ami-windows-latest/Windows_Server-2022-English-%s-EKS_Optimized-%s/%s", windowsAmiType(imageFamily), version, fieldName), nil
case api.NodeImageFamilyWindowsServer2025CoreContainer,
api.NodeImageFamilyWindowsServer2025FullContainer:
const minVersion = api.Version1_35
supportsWindows2025, err := utils.IsMinVersion(minVersion, version)
if err != nil {
return "", err
}
if !supportsWindows2025 {
return "", fmt.Errorf("Windows Server 2025 %s requires EKS version %s and above", windowsAmiType(imageFamily), minVersion)
}
return fmt.Sprintf("/aws/service/ami-windows-latest/Windows_Server-2025-English-%s-EKS_Optimized-%s/%s", windowsAmiType(imageFamily), version, fieldName), nil
case api.NodeImageFamilyBottlerocket:
return fmt.Sprintf("/aws/service/bottlerocket/aws-k8s-%s/%s/latest/%s", imageType(imageFamily, instanceType, version), instanceEC2ArchName(instanceType), fieldName), nil
case api.NodeImageFamilyUbuntu2004,
Expand Down
58 changes: 58 additions & 0 deletions pkg/ami/ssm_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,35 @@ var _ = Describe("AMI Auto Resolution", func() {
})
})

Context("Windows Server 2025 Core", func() {
BeforeEach(func() {
version = "1.35"
p = mockprovider.NewMockProvider()
})

It("should return a valid AMI", func() {
imageFamily = "WindowsServer2025CoreContainer"
addMockGetParameter(p, "/aws/service/ami-windows-latest/Windows_Server-2025-English-Core-EKS_Optimized-1.35/image_id", expectedAmi)

resolver := NewSSMResolver(p.MockSSM())
resolvedAmi, err = resolver.Resolve(context.Background(), region, version, instanceType, imageFamily)

Expect(err).NotTo(HaveOccurred())
Expect(resolvedAmi).To(BeEquivalentTo(expectedAmi))
Expect(p.MockSSM().AssertNumberOfCalls(GinkgoT(), "GetParameter", 1)).To(BeTrue())
})

It("should return an error for EKS versions below 1.35", func() {
imageFamily = "WindowsServer2025CoreContainer"

resolver := NewSSMResolver(p.MockSSM())
resolvedAmi, err = resolver.Resolve(context.Background(), region, "1.34", instanceType, imageFamily)

Expect(err).To(HaveOccurred())
Expect(err).To(MatchError(ContainSubstring("Windows Server 2025 Core requires EKS version 1.35 and above")))
})
})

})

Context("and Windows Full family", func() {
Expand Down Expand Up @@ -232,6 +261,35 @@ var _ = Describe("AMI Auto Resolution", func() {
})
})

Context("Windows Server 2025 Full", func() {
BeforeEach(func() {
version = "1.35"
p = mockprovider.NewMockProvider()
})

It("should return a valid AMI", func() {
imageFamily = "WindowsServer2025FullContainer"
addMockGetParameter(p, "/aws/service/ami-windows-latest/Windows_Server-2025-English-Full-EKS_Optimized-1.35/image_id", expectedAmi)

resolver := NewSSMResolver(p.MockSSM())
resolvedAmi, err = resolver.Resolve(context.Background(), region, version, instanceType, imageFamily)

Expect(err).NotTo(HaveOccurred())
Expect(resolvedAmi).To(BeEquivalentTo(expectedAmi))
Expect(p.MockSSM().AssertNumberOfCalls(GinkgoT(), "GetParameter", 1)).To(BeTrue())
})

It("should return an error for EKS versions below 1.34", func() {
imageFamily = "WindowsServer2025FullContainer"

resolver := NewSSMResolver(p.MockSSM())
resolvedAmi, err = resolver.Resolve(context.Background(), region, "1.34", instanceType, imageFamily)

Expect(err).To(HaveOccurred())
Expect(err).To(MatchError(ContainSubstring("Windows Server 2025 Full requires EKS version 1.35 and above")))
})
})

})

Context("and Ubuntu2004 family", func() {
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/eksctl.io/v1alpha5/amitype.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ func GetAMIType(amiFamily, instanceType string, strict bool) ekstypes.AMITypes {
X86x64: ekstypes.AMITypesWindowsCore2022X8664,
X86Nvidia: ekstypes.AMITypesWindowsCore2022X8664,
},
NodeImageFamilyWindowsServer2025FullContainer: {
X86x64: ekstypes.AMITypes("WINDOWS_FULL_2025_x86_64"),
X86Nvidia: ekstypes.AMITypes("WINDOWS_FULL_2025_x86_64"),
},
NodeImageFamilyWindowsServer2025CoreContainer: {
X86x64: ekstypes.AMITypes("WINDOWS_CORE_2025_x86_64"),
X86Nvidia: ekstypes.AMITypes("WINDOWS_CORE_2025_x86_64"),
Comment thread
kprahulraj marked this conversation as resolved.
},
}

amiType, ok := amiTypeMapping[amiFamily]
Expand Down
16 changes: 10 additions & 6 deletions pkg/apis/eksctl.io/v1alpha5/assets/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1651,8 +1651,8 @@
},
"amiFamily": {
"type": "string",
"description": "Valid variants are: `\"AmazonLinux2023\"` (default), `\"AmazonLinux2\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Ubuntu2004\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
"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>.",
"description": "Valid variants are: `\"AmazonLinux2023\"` (default), `\"AmazonLinux2\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Ubuntu2004\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`, `\"WindowsServer2025CoreContainer\"`, `\"WindowsServer2025FullContainer\"`.",
"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>, <code>&quot;WindowsServer2025CoreContainer&quot;</code>, <code>&quot;WindowsServer2025FullContainer&quot;</code>.",
"default": "AmazonLinux2023",
"enum": [
"AmazonLinux2023",
Expand All @@ -1667,7 +1667,9 @@
"WindowsServer2019CoreContainer",
"WindowsServer2019FullContainer",
"WindowsServer2022CoreContainer",
"WindowsServer2022FullContainer"
"WindowsServer2022FullContainer",
"WindowsServer2025CoreContainer",
"WindowsServer2025FullContainer"
]
},
"asgSuspendProcesses": {
Expand Down Expand Up @@ -2001,8 +2003,8 @@
},
"amiFamily": {
"type": "string",
"description": "Valid variants are: `\"AmazonLinux2023\"` (default), `\"AmazonLinux2\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Ubuntu2004\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`.",
"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>.",
"description": "Valid variants are: `\"AmazonLinux2023\"` (default), `\"AmazonLinux2\"`, `\"UbuntuPro2404\"`, `\"Ubuntu2404\"`, `\"UbuntuPro2204\"`, `\"Ubuntu2204\"`, `\"UbuntuPro2004\"`, `\"Ubuntu2004\"`, `\"Bottlerocket\"`, `\"WindowsServer2019CoreContainer\"`, `\"WindowsServer2019FullContainer\"`, `\"WindowsServer2022CoreContainer\"`, `\"WindowsServer2022FullContainer\"`, `\"WindowsServer2025CoreContainer\"`, `\"WindowsServer2025FullContainer\"`.",
"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>, <code>&quot;WindowsServer2025CoreContainer&quot;</code>, <code>&quot;WindowsServer2025FullContainer&quot;</code>.",
"default": "AmazonLinux2023",
"enum": [
"AmazonLinux2023",
Expand All @@ -2017,7 +2019,9 @@
"WindowsServer2019CoreContainer",
"WindowsServer2019FullContainer",
"WindowsServer2022CoreContainer",
"WindowsServer2022FullContainer"
"WindowsServer2022FullContainer",
"WindowsServer2025CoreContainer",
"WindowsServer2025FullContainer"
]
},
"asgMetricsCollection": {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/eksctl.io/v1alpha5/outposts_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ var _ = Describe("Outposts validation", func() {
Entry("Windows2019Full", api.NodeImageFamilyWindowsServer2019FullContainer, true),
Entry("Windows2022Core", api.NodeImageFamilyWindowsServer2022CoreContainer, true),
Entry("Windows2022Full", api.NodeImageFamilyWindowsServer2022FullContainer, true),
Entry("Windows2025Core", api.NodeImageFamilyWindowsServer2025CoreContainer, true),
Entry("Windows2025Full", api.NodeImageFamilyWindowsServer2025FullContainer, true),
)

type nodeGroupEntry struct {
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/eksctl.io/v1alpha5/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const (
Version1_32 = "1.32"
Version1_33 = "1.33"
Version1_34 = "1.34"
Version1_35 = "1.35"
DockershimDeprecationVersion = Version1_24
AmazonLinux2EOLVersion = Version1_33
// EFABuiltInSupportVersion defines the minimum Kubernetes version that supports built-in EFA
Expand Down Expand Up @@ -224,6 +225,9 @@ const (

NodeImageFamilyWindowsServer2022CoreContainer = "WindowsServer2022CoreContainer"
NodeImageFamilyWindowsServer2022FullContainer = "WindowsServer2022FullContainer"

NodeImageFamilyWindowsServer2025CoreContainer = "WindowsServer2025CoreContainer"
NodeImageFamilyWindowsServer2025FullContainer = "WindowsServer2025FullContainer"
)

// Deprecated `NodeAMIFamily`
Expand Down Expand Up @@ -605,6 +609,8 @@ func SupportedAMIFamilies() []string {
NodeImageFamilyWindowsServer2019FullContainer,
NodeImageFamilyWindowsServer2022CoreContainer,
NodeImageFamilyWindowsServer2022FullContainer,
NodeImageFamilyWindowsServer2025CoreContainer,
NodeImageFamilyWindowsServer2025FullContainer,
}
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/apis/eksctl.io/v1alpha5/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,9 @@ func IsWindowsImage(imageFamily string) bool {
case NodeImageFamilyWindowsServer2019CoreContainer,
NodeImageFamilyWindowsServer2019FullContainer,
NodeImageFamilyWindowsServer2022CoreContainer,
NodeImageFamilyWindowsServer2022FullContainer:
NodeImageFamilyWindowsServer2022FullContainer,
NodeImageFamilyWindowsServer2025CoreContainer,
NodeImageFamilyWindowsServer2025FullContainer:
return true

default:
Expand Down
2 changes: 2 additions & 0 deletions userdocs/src/usage/custom-ami-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ The `--node-ami-family` can take following keywords:
| WindowsServer2019CoreContainer | Indicates that the EKS AMI image based on Windows Server 2019 Core Container should be used. |
| WindowsServer2022FullContainer | Indicates that the EKS AMI image based on Windows Server 2022 Full Container should be used. |
| WindowsServer2022CoreContainer | Indicates that the EKS AMI image based on Windows Server 2022 Core Container should be used. |
| WindowsServer2025FullContainer | Indicates that the EKS AMI image based on Windows Server 2025 Full Container should be used. |
| WindowsServer2025CoreContainer | Indicates that the EKS AMI image based on Windows Server 2025 Core Container should be used. |

CLI flag example:
```sh
Expand Down