diff --git a/examples/blueprint-construct/index.ts b/examples/blueprint-construct/index.ts index c3518fea1..65f10b1de 100644 --- a/examples/blueprint-construct/index.ts +++ b/examples/blueprint-construct/index.ts @@ -322,7 +322,7 @@ export default class BlueprintConstruct { export function getClusterProvider(managedNodeGroups: ManagedNodeGroup[]){ return new blueprints.GenericClusterProvider({ - version: KubernetesVersion.V1_29, + version: KubernetesVersion.V1_30, tags: { "Name": "blueprints-example-cluster", "Type": "generic-cluster" diff --git a/lib/cluster-providers/generic-cluster-provider.ts b/lib/cluster-providers/generic-cluster-provider.ts index 29b64045c..204b73ca3 100644 --- a/lib/cluster-providers/generic-cluster-provider.ts +++ b/lib/cluster-providers/generic-cluster-provider.ts @@ -1,12 +1,11 @@ -import { KubectlV23Layer } from "@aws-cdk/lambda-layer-kubectl-v23"; -import { KubectlV24Layer } from "@aws-cdk/lambda-layer-kubectl-v24"; import { KubectlV25Layer } from "@aws-cdk/lambda-layer-kubectl-v25"; import { KubectlV26Layer } from "@aws-cdk/lambda-layer-kubectl-v26"; import { KubectlV27Layer } from "@aws-cdk/lambda-layer-kubectl-v27"; import { KubectlV28Layer } from "@aws-cdk/lambda-layer-kubectl-v28"; import { KubectlV29Layer } from "@aws-cdk/lambda-layer-kubectl-v29"; import { KubectlV30Layer } from "@aws-cdk/lambda-layer-kubectl-v30"; +import { KubectlV31Layer } from "@aws-cdk/lambda-layer-kubectl-v31"; import { Tags } from "aws-cdk-lib"; import * as autoscaling from 'aws-cdk-lib/aws-autoscaling'; @@ -34,10 +33,6 @@ export function clusterBuilder() { */ export function selectKubectlLayer(scope: Construct, version: eks.KubernetesVersion): ILayerVersion | undefined { switch(version.version) { - case "1.23": - return new KubectlV23Layer(scope, "kubectllayer23"); - case "1.24": - return new KubectlV24Layer(scope, "kubectllayer24"); case "1.25": return new KubectlV25Layer(scope, "kubectllayer25"); case "1.26": @@ -50,13 +45,15 @@ export function selectKubectlLayer(scope: Construct, version: eks.KubernetesVers return new KubectlV29Layer(scope, "kubectllayer29"); case "1.30": return new KubectlV30Layer(scope, "kubectllayer30"); + case "1.31": + return new KubectlV31Layer(scope, "kubectllayer30"); } const minor = version.version.split('.')[1]; - if(minor && parseInt(minor, 10) > 30) { - return new KubectlV30Layer(scope, "kubectllayer30"); // for all versions above 1.30 use 1.30 kubectl (unless explicitly supported in CDK) + if(minor && parseInt(minor, 10) > 31) { + return new KubectlV30Layer(scope, "kubectllayer31"); // for all versions above 1.30 use 1.30 kubectl (unless explicitly supported in CDK) } return undefined; } diff --git a/lib/stacks/eks-blueprint-construct.ts b/lib/stacks/eks-blueprint-construct.ts index 3f6c08dab..3f9ad27f5 100644 --- a/lib/stacks/eks-blueprint-construct.ts +++ b/lib/stacks/eks-blueprint-construct.ts @@ -14,7 +14,7 @@ import { ArgoGitOpsFactory } from "../addons/argocd/argo-gitops-factory"; import * as eks from "aws-cdk-lib/aws-eks"; /* Default K8s version of EKS Blueprints */ -export const DEFAULT_VERSION = KubernetesVersion.V1_29; +export const DEFAULT_VERSION = KubernetesVersion.V1_30; /** * Exporting control plane log type so that customers don't have to import CDK EKS module for blueprint configuration. diff --git a/package.json b/package.json index fb3091452..1ffb878f0 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "@aws-cdk/lambda-layer-kubectl-v28": "^2.2.0", "@aws-cdk/lambda-layer-kubectl-v29": "^2.1.0", "@aws-cdk/lambda-layer-kubectl-v30": "^2.0.0", + "@aws-cdk/lambda-layer-kubectl-v31": "^2.0.0", "@aws-sdk/client-eks": "^3.529.1", "@aws-sdk/client-secrets-manager": "^3.529.1", "@types/assert": "^1.5.10",