From ab47ea9ff389df8bc1bd289f75881b0f40a8cc29 Mon Sep 17 00:00:00 2001 From: Aaron Miller <1521726+aaroniscode@users.noreply.github.com> Date: Wed, 2 Oct 2024 09:52:02 -0700 Subject: [PATCH] add: support for EKS v1.31 (#252) --- README.md | 4 ++-- .../cluster_autoscaler/cluster_autoscaler.go | 20 ++++++++++--------- pkg/eksctl/eksctl.go | 2 +- pkg/resource/cluster/options.go | 4 ++-- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b69d4ee..6a7c0fb 100644 --- a/README.md +++ b/README.md @@ -178,8 +178,8 @@ To validate the AWS region is set, you can run **`eksdemo get cluster`** which w +------------+--------+---------+---------+----------+----------+ | Age | Status | Cluster | Version | Platform | Endpoint | +------------+--------+---------+---------+----------+----------+ -| 3 weeks | ACTIVE | green | 1.27 | eks.17 | Public | -| 20 minutes | ACTIVE | *blue | 1.30 | eks.6 | Public | +| 3 weeks | ACTIVE | green | 1.27 | eks.23 | Public | +| 20 minutes | ACTIVE | *blue | 1.31 | eks.2 | Public | +------------+--------+---------+---------+----------+----------+ * Indicates current context in local kubeconfig ``` diff --git a/pkg/application/autoscaling/cluster_autoscaler/cluster_autoscaler.go b/pkg/application/autoscaling/cluster_autoscaler/cluster_autoscaler.go index a5a0d52..855dc5e 100644 --- a/pkg/application/autoscaling/cluster_autoscaler/cluster_autoscaler.go +++ b/pkg/application/autoscaling/cluster_autoscaler/cluster_autoscaler.go @@ -13,7 +13,7 @@ import ( // GitHub: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/aws // Helm: https://github.com/kubernetes/autoscaler/tree/master/charts/cluster-autoscaler // Repo: registry.k8s.io/autoscaling/cluster-autoscaler -// Version: Latest for k8s 1.30 is v1.30.1 (as of 5/31/24) +// Version: Latest for k8s 1.31 is v1.31.0 (as of 9/30/24) func NewApp() *application.Application { app := &application.Application{ @@ -40,21 +40,23 @@ func NewApp() *application.Application { Namespace: "kube-system", ServiceAccount: "cluster-autoscaler", DefaultVersion: &application.KubernetesVersionDependent{ - LatestChart: "9.37.0", + LatestChart: "9.42.0", Latest: map[string]string{ - "1.30": "v1.30.1", - "1.29": "v1.29.3", - "1.28": "v1.28.5", + "1.31": "v1.31.0", + "1.30": "v1.30.2", + "1.29": "v1.29.4", + "1.28": "v1.28.6", "1.27": "v1.27.8", "1.26": "v1.26.8", "1.25": "v1.25.3", "1.24": "v1.24.3", }, - PreviousChart: "9.34.1", + PreviousChart: "9.37.0", Previous: map[string]string{ - "1.30": "v1.30.0", - "1.29": "v1.29.0", - "1.28": "v1.28.2", + "1.31": "v1.31.0", + "1.30": "v1.30.1", + "1.29": "v1.29.3", + "1.28": "v1.28.5", "1.27": "v1.27.5", "1.26": "v1.26.6", "1.25": "v1.25.1", diff --git a/pkg/eksctl/eksctl.go b/pkg/eksctl/eksctl.go index 7be984d..7366b63 100644 --- a/pkg/eksctl/eksctl.go +++ b/pkg/eksctl/eksctl.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/go-version" ) -const minVersion = "0.179.0" +const minVersion = "0.191.0" func GetClusterName(cluster string) string { return fmt.Sprintf("%s.%s.eksctl.io", cluster, aws.Region()) diff --git a/pkg/resource/cluster/options.go b/pkg/resource/cluster/options.go index 91d57ed..75447d5 100644 --- a/pkg/resource/cluster/options.go +++ b/pkg/resource/cluster/options.go @@ -53,7 +53,7 @@ func addOptions(res *resource.Resource) *resource.Resource { options := &ClusterOptions{ CommonOptions: resource.CommonOptions{ ClusterFlagDisabled: true, - KubernetesVersion: "1.30", + KubernetesVersion: "1.31", }, HostnameType: string(types.HostnameTypeResourceName), @@ -92,7 +92,7 @@ func addOptions(res *resource.Resource) *resource.Resource { Description: "Kubernetes version", Shorthand: "v", }, - Choices: []string{"1.30", "1.29", "1.28", "1.27", "1.26", "1.25", "1.24"}, + Choices: []string{"1.31", "1.30", "1.29", "1.28", "1.27", "1.26", "1.25", "1.24"}, Option: &options.KubernetesVersion, }, &cmd.BoolFlag{