Skip to content

Commit

Permalink
Merge branch 'eksctl-io:main' into fix
Browse files Browse the repository at this point in the history
  • Loading branch information
a2ush committed Feb 10, 2024
2 parents dd4ce16 + 87e12f2 commit 59afa81
Show file tree
Hide file tree
Showing 20 changed files with 152 additions and 166 deletions.
13 changes: 13 additions & 0 deletions docs/release_notes/0.171.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Release v0.171.0

## 🚀 Features

- Add support for Ubuntu 22.04 based EKS images (#7516)

## 📝 Documentation

- Announce eksctl Support Status Update on eksctl.io (#7539)

## Acknowledgments
The eksctl maintainers would like to sincerely thank:
@toabctl
6 changes: 5 additions & 1 deletion pkg/ami/auto_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ func MakeImageSearchPatterns(version string) map[string]map[int]string {
ImageClassGPU: fmt.Sprintf("amazon-eks-gpu-node-%s-*", version),
ImageClassARM: fmt.Sprintf("amazon-eks-arm64-node-%s-*", version),
},
api.NodeImageFamilyUbuntu2204: {
ImageClassGeneral: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*22.04-amd64*", version),
ImageClassARM: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*22.04-arm64*", version),
},
api.NodeImageFamilyUbuntu2004: {
ImageClassGeneral: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*20.04-amd64*", version),
ImageClassARM: fmt.Sprintf("ubuntu-eks/k8s_%s/images/*20.04-arm64*", version),
Expand All @@ -53,7 +57,7 @@ func MakeImageSearchPatterns(version string) map[string]map[int]string {
// OwnerAccountID returns the AWS account ID that owns worker AMI.
func OwnerAccountID(imageFamily, region string) (string, error) {
switch imageFamily {
case api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu1804:
case api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu1804:
return ownerIDUbuntuFamily, nil
case api.NodeImageFamilyAmazonLinux2:
return api.EKSResourceAccountID(region), nil
Expand Down
5 changes: 5 additions & 0 deletions pkg/ami/auto_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ var _ = Describe("AMI Auto Resolution", func() {
Expect(ownerAccount).To(BeEquivalentTo("099720109477"))
Expect(err).NotTo(HaveOccurred())
})
It("should return the Ubuntu Account ID for Ubuntu images", func() {
ownerAccount, err := OwnerAccountID(api.NodeImageFamilyUbuntu2204, region)
Expect(ownerAccount).To(BeEquivalentTo("099720109477"))
Expect(err).NotTo(HaveOccurred())
})

It("should return the Windows Account ID for Windows Server images", func() {
ownerAccount, err := OwnerAccountID(api.NodeImageFamilyWindowsServer2022CoreContainer, region)
Expand Down
3 changes: 2 additions & 1 deletion pkg/ami/ssm_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ func MakeSSMParameterName(version, instanceType, imageFamily string) (string, er
return fmt.Sprintf("/aws/service/ami-windows-latest/Windows_Server-2022-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, api.NodeImageFamilyUbuntu1804:
case api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu1804:
// FIXME: SSM lookup for Ubuntu EKS images is supported nowadays
return "", &UnsupportedQueryError{msg: fmt.Sprintf("SSM Parameter lookups for %s AMIs is not supported yet", imageFamily)}
default:
return "", fmt.Errorf("unknown image family %s", imageFamily)
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/eksctl.io/v1alpha5/outposts_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ var _ = Describe("Outposts validation", func() {
Entry("Bottlerocket", api.NodeImageFamilyBottlerocket, true),
Entry("Ubuntu1804", api.NodeImageFamilyUbuntu1804, true),
Entry("Ubuntu2004", api.NodeImageFamilyUbuntu2004, true),
Entry("Ubuntu2204", api.NodeImageFamilyUbuntu2204, true),
Entry("Windows2019Core", api.NodeImageFamilyWindowsServer2019CoreContainer, true),
Entry("Windows2019Full", api.NodeImageFamilyWindowsServer2019FullContainer, true),
Entry("Windows2022Core", api.NodeImageFamilyWindowsServer2022CoreContainer, true),
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/eksctl.io/v1alpha5/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ const (
// DefaultNodeImageFamily (default)
DefaultNodeImageFamily = NodeImageFamilyAmazonLinux2
NodeImageFamilyAmazonLinux2 = "AmazonLinux2"
NodeImageFamilyUbuntu2204 = "Ubuntu2204"
NodeImageFamilyUbuntu2004 = "Ubuntu2004"
NodeImageFamilyUbuntu1804 = "Ubuntu1804"
NodeImageFamilyBottlerocket = "Bottlerocket"
Expand Down Expand Up @@ -606,6 +607,7 @@ func SupportedNodeVolumeTypes() []string {
func supportedAMIFamilies() []string {
return []string{
NodeImageFamilyAmazonLinux2,
NodeImageFamilyUbuntu2204,
NodeImageFamilyUbuntu2004,
NodeImageFamilyUbuntu1804,
NodeImageFamilyBottlerocket,
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/eksctl.io/v1alpha5/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -1230,8 +1230,8 @@ func ValidateManagedNodeGroup(index int, ng *ManagedNodeGroup) error {
if ng.AMIFamily == "" {
return errors.Errorf("when using a custom AMI, amiFamily needs to be explicitly set via config file or via --node-ami-family flag")
}
if ng.AMIFamily != NodeImageFamilyAmazonLinux2 && ng.AMIFamily != NodeImageFamilyUbuntu1804 && ng.AMIFamily != NodeImageFamilyUbuntu2004 {
return errors.Errorf("cannot set amiFamily to %s when using a custom AMI for managed nodes, only %s, %s and %s are supported", ng.AMIFamily, NodeImageFamilyAmazonLinux2, NodeImageFamilyUbuntu1804, NodeImageFamilyUbuntu2004)
if ng.AMIFamily != NodeImageFamilyAmazonLinux2 && ng.AMIFamily != NodeImageFamilyUbuntu1804 && ng.AMIFamily != NodeImageFamilyUbuntu2004 && ng.AMIFamily != NodeImageFamilyUbuntu2204 {
return errors.Errorf("cannot set amiFamily to %s when using a custom AMI for managed nodes, only %s, %s, %s and %s are supported", ng.AMIFamily, NodeImageFamilyAmazonLinux2, NodeImageFamilyUbuntu1804, NodeImageFamilyUbuntu2004, NodeImageFamilyUbuntu2204)
}
if ng.OverrideBootstrapCommand == nil {
return errors.Errorf("%[1]s.overrideBootstrapCommand is required when using a custom AMI based on %s (%[1]s.ami)", path, ng.AMIFamily)
Expand Down
8 changes: 6 additions & 2 deletions pkg/apis/eksctl.io/v1alpha5/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ var _ = Describe("ClusterConfig validation", func() {
It("fails when the AMIFamily is not supported", func() {
ng.AMIFamily = "SomeTrash"
err := api.ValidateNodeGroup(0, ng, cfg)
Expect(err).To(MatchError("AMI Family SomeTrash is not supported - use one of: AmazonLinux2, Ubuntu2004, Ubuntu1804, Bottlerocket, WindowsServer2019CoreContainer, WindowsServer2019FullContainer, WindowsServer2022CoreContainer, WindowsServer2022FullContainer"))
Expect(err).To(MatchError("AMI Family SomeTrash is not supported - use one of: AmazonLinux2, Ubuntu2204, Ubuntu2004, Ubuntu1804, Bottlerocket, WindowsServer2019CoreContainer, WindowsServer2019FullContainer, WindowsServer2022CoreContainer, WindowsServer2022FullContainer"))
})

It("fails when the AmiFamily is not supported for managed nodes with custom AMI", func() {
Expand All @@ -2022,10 +2022,14 @@ var _ = Describe("ClusterConfig validation", func() {
err = api.ValidateManagedNodeGroup(0, mng)
Expect(err).NotTo(HaveOccurred())

mng.AMIFamily = api.NodeImageFamilyUbuntu2204
err = api.ValidateManagedNodeGroup(0, mng)
Expect(err).NotTo(HaveOccurred())

mng.AMIFamily = api.NodeImageFamilyBottlerocket
mng.OverrideBootstrapCommand = nil
err = api.ValidateManagedNodeGroup(0, mng)
errorMsg := fmt.Sprintf("cannot set amiFamily to %s when using a custom AMI for managed nodes, only %s, %s and %s are supported", mng.AMIFamily, api.NodeImageFamilyAmazonLinux2, api.NodeImageFamilyUbuntu1804, api.NodeImageFamilyUbuntu2004)
errorMsg := fmt.Sprintf("cannot set amiFamily to %s when using a custom AMI for managed nodes, only %s, %s, %s and %s are supported", mng.AMIFamily, api.NodeImageFamilyAmazonLinux2, api.NodeImageFamilyUbuntu1804, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu2204)
Expect(err).To(MatchError(errorMsg))
})

Expand Down
10 changes: 10 additions & 0 deletions pkg/cfn/builder/managed_nodegroup_ami_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,14 @@ var _ = DescribeTable("Managed Nodegroup AMI type", func(e amiTypeEntry) {
},
expectedAMIType: "CUSTOM",
}),

Entry("non-native Ubuntu", amiTypeEntry{
nodeGroup: &api.ManagedNodeGroup{
NodeGroupBase: &api.NodeGroupBase{
Name: "test",
AMIFamily: api.NodeImageFamilyUbuntu2204,
},
},
expectedAMIType: "CUSTOM",
}),
)
2 changes: 1 addition & 1 deletion pkg/ctl/cmdutils/nodegroup_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func AddCommonCreateNodeGroupFlags(fs *pflag.FlagSet, cmd *Cmd, ng *api.NodeGrou
ng.SSH.EnableSSM = fs.Bool("enable-ssm", false, "Enable AWS Systems Manager (SSM)")

fs.StringVar(&ng.AMI, "node-ami", "", "'auto-ssm', 'auto' or an AMI ID (advanced use)")
fs.StringVar(&ng.AMIFamily, "node-ami-family", api.DefaultNodeImageFamily, "'AmazonLinux2' for the Amazon EKS optimized AMI, or use 'Ubuntu2004' or 'Ubuntu1804' for the official Canonical EKS AMIs")
fs.StringVar(&ng.AMIFamily, "node-ami-family", api.DefaultNodeImageFamily, "'AmazonLinux2' for the Amazon EKS optimized AMI, or use 'Ubuntu2204', 'Ubuntu2004' or 'Ubuntu1804' for the official Canonical EKS AMIs")

fs.BoolVarP(&ng.PrivateNetworking, "node-private-networking", "P", false, "whether to make nodegroup networking private")

Expand Down
4 changes: 2 additions & 2 deletions pkg/nodebootstrap/userdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewBootstrapper(clusterConfig *api.ClusterConfig, ng *api.NodeGroup) (Boots
return NewWindowsBootstrapper(clusterConfig, ng, clusterDNS), nil
}
switch ng.AMIFamily {
case api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu1804:
case api.NodeImageFamilyUbuntu2204, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu1804:
return NewUbuntuBootstrapper(clusterConfig, ng, clusterDNS), nil
case api.NodeImageFamilyBottlerocket:
return NewBottlerocketBootstrapper(clusterConfig, ng), nil
Expand All @@ -72,7 +72,7 @@ func NewManagedBootstrapper(clusterConfig *api.ClusterConfig, ng *api.ManagedNod
return NewManagedAL2Bootstrapper(ng), nil
case api.NodeImageFamilyBottlerocket:
return NewManagedBottlerocketBootstrapper(clusterConfig, ng), nil
case api.NodeImageFamilyUbuntu1804, api.NodeImageFamilyUbuntu2004:
case api.NodeImageFamilyUbuntu1804, api.NodeImageFamilyUbuntu2004, api.NodeImageFamilyUbuntu2204:
clusterDNS, err := GetClusterDNS(clusterConfig)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/version/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package version
// This file was generated by release_generate.go; DO NOT EDIT.

// Version is the version number in semver format X.Y.Z
var Version = "0.171.0"
var Version = "0.172.0"

// PreReleaseID can be empty for releases, "rc.X" for release candidates and "dev" for snapshots
var PreReleaseID = "dev"
Expand Down
14 changes: 8 additions & 6 deletions userdocs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ theme:
features:
- header.autohide
- navigation.instant
- navigation.sections
- navigation.top
- navigation.tabs
- navigation.tabs.sticky
Expand Down Expand Up @@ -135,10 +134,13 @@ nav:
- Getting Started:
- Introduction: getting-started.md
- Installation: installation.md
- Config File Schema: usage/schema.md
- Dry Run: usage/dry-run.md
- FAQ: usage/faq.md
- Announcements:
- announcements/managed-nodegroups-announcement.md
- announcements/nodegroup-override-announcement.md
- Usage:
- User Guide:
- Clusters:
- usage/creating-and-managing-clusters.md
- usage/access-entries.md
Expand Down Expand Up @@ -170,6 +172,8 @@ nav:
- usage/container-runtime.md
- usage/windows-worker-nodes.md
- usage/nodegroup-additional-volume-mappings.md
- usage/eksctl-karpenter.md
- usage/eksctl-anywhere.md
- GitOps:
- usage/gitops-v2.md
- Security:
Expand All @@ -189,12 +193,10 @@ nav:
- usage/iam-identity-mappings.md
- usage/iamserviceaccounts.md
- usage/pod-identity-associations.md
- usage/dry-run.md
- usage/schema.md
- usage/eksctl-anywhere.md
- usage/eksctl-karpenter.md
- usage/dry-run.md
- usage/troubleshooting.md
- FAQ: usage/faq.md
- Examples: "https://github.com/eksctl-io/eksctl/tree/main/examples"
- Example Configs: "https://github.com/eksctl-io/eksctl/tree/main/examples"
- Community: community.md
- Adopters: adopters.md
52 changes: 2 additions & 50 deletions userdocs/src/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ For more information, please head to our [Community][community] and [Contributin
[community]: https://github.com/eksctl-io/eksctl/blob/main/COMMUNITY.md
[contributing]: https://github.com/eksctl-io/eksctl/blob/main/CONTRIBUTING.md

## Get in touch :simple-wechat:
## Get in touch :material-chat-processing-outline:

[Create an issue](https://github.com/eksctl-io/eksctl/issues/new), or login to [Eksctl Slack (#eksctl)][slackchan] ([signup][slackjoin]).

[slackjoin]: https://slack.k8s.io/
[slackchan]: https://slack.k8s.io/messages/eksctl/

## Release Cadence :material-clipboard-check-multiple-outline:
## Release Cadence :simple-starship:

Minor releases of `eksctl` are loosely scheduled for weekly on Fridays. Patch
releases will be made available as needed.
Expand All @@ -28,51 +28,3 @@ each minor release. RC builds are intended only for testing purposes.
## Eksctl Roadmap :octicons-project-roadmap-16:

The EKS section of the AWS Containers Roadmap contains the overall roadmap for EKS. All the upcoming features for `eksctl` built in partnership with AWS can be found [here](https://github.com/aws/containers-roadmap/projects/1?card_filter_query=label%3Aeks).

## 2021 Roadmap

The following are the features/epics we will focus on and hope to ship this year.
We will take their completion as a marker for graduation to v1.
General maintenance of `eksctl` is still implied alongside this work,
but all subsequent features which are suggested during the year will be weighed
in relation to the core targets.

Progress on the roadmap can be tracked [here](https://github.com/eksctl-io/eksctl/projects/2).

### Technical Debt

Not a feature, but a vital pre-requisite to making actual feature work straightforward.

Key aims within this goal include, but are not limited to:

- [Refactoring/simplifying the Provider](https://github.com/eksctl-io/eksctl/issues/2931)
- [Expose core `eksctl` workflows through a library/SDK](https://github.com/eksctl-io/eksctl/issues/813)
- Greater integration test coverage and resilience
- Greater unit test coverage (this will either be dependent on, or help drive out,
better internal interface boundaries)

### Declarative configuration and cluster reconciliation

This has been on the TODO list for quite a while, and we are very excited to bring
it into scope for 2021

Current interaction with `eksctl` is imperative, we hope to add support for declarative
configuration and cluster reconciliation via a new `eksctl apply -f config.yaml`
command. This model will additionally allow users to manage a cluster via a git repo.

A [WIP proposal](https://github.com/eksctl-io/eksctl/blob/main/docs/proposal-007-apply.md)
is already under consideration, to participate in the development of this feature
please refer to the [tracking issue](https://github.com/eksctl-io/eksctl/issues/2774)
and our [proposal contributing guide](https://github.com/eksctl-io/eksctl/blob/main/CONTRIBUTING.md#proposals).

### Flux v2 integration (GitOps Toolkit)

In 2019 `eksctl` gave users a way to easily create a Gitops-ready ([Flux v1](https://docs.fluxcd.io/en/1.21.1/))
cluster and to declare a set of pre-installed applications Quickstart profiles which can be managed via a git repo.

Since then, the practice of GitOps has matured, therefore `eksctl`'s support of
GitOps has changed to keep up with current standards. From version 0.76.0 Flux v1 support was removed after an 11
month deprecation period. In its place support for [Flux v2](https://fluxcd.io/) can be used via
`eksctl enable flux`


0 comments on commit 59afa81

Please sign in to comment.