From 5e8988ce693eda83c0b31c9331f26e2130b19a4c Mon Sep 17 00:00:00 2001 From: shapirov Date: Fri, 18 Aug 2023 11:46:53 -0400 Subject: [PATCH 1/4] upgraded add-on version to latest compatible, CDK moved to 2.92, NPM lib updates --- docs/getting-started.md | 1 - lib/addons/adot/index.ts | 2 +- lib/addons/appmesh/index.ts | 2 +- lib/addons/argocd/index.ts | 2 +- lib/addons/aws-for-fluent-bit/index.ts | 2 +- .../aws-loadbalancer-controller/index.ts | 2 +- lib/addons/cert-manager/index.ts | 2 +- lib/addons/cloudwatch-logs/index.ts | 2 +- lib/addons/coredns/index.ts | 2 +- lib/addons/ebs-csi-driver/index.ts | 2 +- lib/addons/efs-csi-driver/index.ts | 2 +- lib/addons/external-secrets/index.ts | 2 +- lib/addons/fluxcd/index.ts | 2 +- lib/addons/istio-base/index.ts | 2 +- lib/addons/istio-control-plane/index.ts | 2 +- lib/addons/karpenter/index.ts | 2 +- lib/addons/keda/index.ts | 2 +- lib/addons/kube-proxy/index.ts | 2 +- lib/addons/kube-state-metrics/index.ts | 2 +- lib/addons/metrics-server/index.ts | 2 +- lib/addons/nginx/index.ts | 2 +- lib/addons/opa-gatekeeper/index.ts | 2 +- lib/addons/prometheus-node-exporter/index.ts | 2 +- lib/addons/vpc-cni/index.ts | 2 +- .../generic-cluster-provider.ts | 8 ++--- package.json | 31 ++++++++++--------- 26 files changed, 44 insertions(+), 42 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 07a7b7239..333a1be2f 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -43,7 +43,6 @@ npm i @aws-quickstart/eks-blueprints Replace the contents of `bin/.ts` (where `your-main-file` by default is the name of the root project directory) with the following code. This code will deploy a new EKS Cluster and install the `ArgoCD` addon. ```typescript -import 'source-map-support/register'; import * as cdk from 'aws-cdk-lib'; import * as blueprints from '@aws-quickstart/eks-blueprints'; diff --git a/lib/addons/adot/index.ts b/lib/addons/adot/index.ts index d3370e704..77206f397 100644 --- a/lib/addons/adot/index.ts +++ b/lib/addons/adot/index.ts @@ -13,7 +13,7 @@ type AdotCollectorAddOnProps = CoreAddOnProps; const defaultProps = { addOnName: 'adot', - version: 'v0.76.1-eksbuild.1', + version: 'v0.78.0-eksbuild.1', saName: 'adot-collector', policyDocumentProvider: getAdotCollectorPolicyDocument, namespace: 'default' diff --git a/lib/addons/appmesh/index.ts b/lib/addons/appmesh/index.ts index 0159834d8..ac72f700a 100644 --- a/lib/addons/appmesh/index.ts +++ b/lib/addons/appmesh/index.ts @@ -44,7 +44,7 @@ const defaultProps = { name: "appmesh-controller", namespace: "appmesh-system", chart: "appmesh-controller", - version: "1.12.1", + version: "1.12.2", release: "appmesh-release", repository: "https://aws.github.io/eks-charts" }; diff --git a/lib/addons/argocd/index.ts b/lib/addons/argocd/index.ts index dac2f832c..eb9591807 100644 --- a/lib/addons/argocd/index.ts +++ b/lib/addons/argocd/index.ts @@ -72,7 +72,7 @@ export interface ArgoCDAddOnProps extends HelmAddOnUserProps { */ const defaultProps = { namespace: "argocd", - version: '5.41.1', + version: '5.43.4', chart: "argo-cd", release: "blueprints-addon-argocd", repository: "https://argoproj.github.io/argo-helm" diff --git a/lib/addons/aws-for-fluent-bit/index.ts b/lib/addons/aws-for-fluent-bit/index.ts index be1340e3a..f1a4fc77c 100644 --- a/lib/addons/aws-for-fluent-bit/index.ts +++ b/lib/addons/aws-for-fluent-bit/index.ts @@ -26,7 +26,7 @@ const defaultProps: AwsForFluentBitAddOnProps = { name: 'fluent-bit', chart: 'aws-for-fluent-bit', release: "blueprints-addon-aws-for-fluent-bit", - version: '0.1.27', + version: '0.1.28', repository: 'https://aws.github.io/eks-charts', namespace: 'kube-system', createNamespace: false, diff --git a/lib/addons/aws-loadbalancer-controller/index.ts b/lib/addons/aws-loadbalancer-controller/index.ts index c9c5965c5..408eea81c 100644 --- a/lib/addons/aws-loadbalancer-controller/index.ts +++ b/lib/addons/aws-loadbalancer-controller/index.ts @@ -56,7 +56,7 @@ const defaultProps: AwsLoadBalancerControllerProps = { chart: AWS_LOAD_BALANCER_CONTROLLER, repository: 'https://aws.github.io/eks-charts', release: AWS_LOAD_BALANCER_CONTROLLER, - version: '1.5.5', + version: '1.6.0', enableShield: false, enableWaf: false, enableWafv2: false, diff --git a/lib/addons/cert-manager/index.ts b/lib/addons/cert-manager/index.ts index ac4d49e70..e6b6b4603 100644 --- a/lib/addons/cert-manager/index.ts +++ b/lib/addons/cert-manager/index.ts @@ -27,7 +27,7 @@ const defaultProps: HelmAddOnProps & CertManagerAddOnProps = { name: "blueprints-cert-manager-addon", namespace: "cert-manager", chart: "cert-manager", - version: "1.12.2", + version: "1.12.3", release: "cert-manager", repository: "https://charts.jetstack.io", values: {}, diff --git a/lib/addons/cloudwatch-logs/index.ts b/lib/addons/cloudwatch-logs/index.ts index f5ba1aa30..ec1c052b4 100644 --- a/lib/addons/cloudwatch-logs/index.ts +++ b/lib/addons/cloudwatch-logs/index.ts @@ -38,7 +38,7 @@ const defaultProps: CloudWatchLogsAddonProps = { name: 'aws-for-fluent-bit', chart: 'aws-for-fluent-bit', release: "blueprints-addon-aws-fluent-bit-for-cw", - version: '0.1.27', + version: '0.1.28', repository: 'https://aws.github.io/eks-charts', namespace: 'aws-for-fluent-bit', createNamespace: true, diff --git a/lib/addons/coredns/index.ts b/lib/addons/coredns/index.ts index 083e46ff0..5a774b10d 100644 --- a/lib/addons/coredns/index.ts +++ b/lib/addons/coredns/index.ts @@ -7,7 +7,7 @@ type coreDnsAddOnProps = Omit; const defaultProps = { addOnName: 'coredns', - version: 'v1.9.3-eksbuild.5', + version: 'v1.10.1-eksbuild.2', saName: 'coredns', configurationValues: {} }; diff --git a/lib/addons/ebs-csi-driver/index.ts b/lib/addons/ebs-csi-driver/index.ts index 945730788..8ad08de58 100644 --- a/lib/addons/ebs-csi-driver/index.ts +++ b/lib/addons/ebs-csi-driver/index.ts @@ -23,7 +23,7 @@ export interface EbsCsiDriverAddOnProps { */ const defaultProps = { addOnName: "aws-ebs-csi-driver", - version: "v1.20.0-eksbuild.1", + version: "v1.21.0-eksbuild.1", saName: "ebs-csi-controller-sa", }; diff --git a/lib/addons/efs-csi-driver/index.ts b/lib/addons/efs-csi-driver/index.ts index 55085773c..8e993f700 100644 --- a/lib/addons/efs-csi-driver/index.ts +++ b/lib/addons/efs-csi-driver/index.ts @@ -37,7 +37,7 @@ export interface EfsCsiDriverProps extends HelmAddOnUserProps { * Defaults options for the add-on */ const defaultProps: EfsCsiDriverProps = { - version: '2.4.7', + version: '2.4.9', namespace: "kube-system", repository: "https://kubernetes-sigs.github.io/aws-efs-csi-driver/", name: EFS_CSI_DRIVER, diff --git a/lib/addons/external-secrets/index.ts b/lib/addons/external-secrets/index.ts index fc18629b5..f088adee2 100644 --- a/lib/addons/external-secrets/index.ts +++ b/lib/addons/external-secrets/index.ts @@ -23,7 +23,7 @@ const defaultProps: ExternalsSecretsAddOnProps = { name: "external-secrets", chart: "external-secrets", release: "blueprints-addon-external-secrets", - version: "0.9.1", + version: "0.9.3", repository: "https://charts.external-secrets.io", namespace: "external-secrets", values: {}, diff --git a/lib/addons/fluxcd/index.ts b/lib/addons/fluxcd/index.ts index d71cf7966..382a7820c 100644 --- a/lib/addons/fluxcd/index.ts +++ b/lib/addons/fluxcd/index.ts @@ -95,7 +95,7 @@ const defaultProps: HelmAddOnProps & FluxCDAddOnProps = { name: "fluxcd-addon", namespace: "flux-system", chart: "flux2", - version: "2.9.0", + version: "2.9.2", release: "blueprints-fluxcd-addon", repository: "https://fluxcd-community.github.io/helm-charts", values: {}, diff --git a/lib/addons/istio-base/index.ts b/lib/addons/istio-base/index.ts index c277f394b..701aea121 100644 --- a/lib/addons/istio-base/index.ts +++ b/lib/addons/istio-base/index.ts @@ -55,7 +55,7 @@ const defaultProps = { release: "istio-base", namespace: "istio-system", chart: "base", - version: "1.18.1", + version: "1.18.2", repository: "https://istio-release.storage.googleapis.com/charts" }; diff --git a/lib/addons/istio-control-plane/index.ts b/lib/addons/istio-control-plane/index.ts index d790bd819..39da59da0 100644 --- a/lib/addons/istio-control-plane/index.ts +++ b/lib/addons/istio-control-plane/index.ts @@ -14,7 +14,7 @@ const defaultProps = { release: "istiod", namespace: "istio-system", chart: "istiod", - version: "1.18.1", + version: "1.18.2", repository: "https://istio-release.storage.googleapis.com/charts" }; diff --git a/lib/addons/karpenter/index.ts b/lib/addons/karpenter/index.ts index 3989c62c3..aba6345c7 100644 --- a/lib/addons/karpenter/index.ts +++ b/lib/addons/karpenter/index.ts @@ -142,7 +142,7 @@ const RELEASE = 'blueprints-addon-karpenter'; const defaultProps: HelmAddOnProps = { name: KARPENTER, namespace: KARPENTER, - version: 'v0.28.0', + version: 'v0.29.2', chart: KARPENTER, release: KARPENTER, repository: 'oci://public.ecr.aws/karpenter/karpenter', diff --git a/lib/addons/keda/index.ts b/lib/addons/keda/index.ts index c1ee378f1..0992a8b6f 100644 --- a/lib/addons/keda/index.ts +++ b/lib/addons/keda/index.ts @@ -52,7 +52,7 @@ const defaultProps: HelmAddOnProps & KedaAddOnProps = { name: "blueprints-keda-addon", chart: "keda", namespace:"keda", - version: "2.11.1", + version: "2.11.2", release: "keda", repository: "https://kedacore.github.io/charts", values: {}, diff --git a/lib/addons/kube-proxy/index.ts b/lib/addons/kube-proxy/index.ts index 939a488f6..3b634ae45 100644 --- a/lib/addons/kube-proxy/index.ts +++ b/lib/addons/kube-proxy/index.ts @@ -2,7 +2,7 @@ import { KubernetesVersion } from "aws-cdk-lib/aws-eks"; import { CoreAddOn } from "../core-addon"; const versionMap: Map = new Map([ - [KubernetesVersion.of("1.27"), "v1.27.1-eksbuild.1"], + [KubernetesVersion.V1_27, "v1.27.1-eksbuild.1"], [KubernetesVersion.V1_26, "v1.26.2-eksbuild.1"], [KubernetesVersion.V1_25, "v1.25.6-eksbuild.1"], [KubernetesVersion.V1_24, "v1.24.7-eksbuild.2"], diff --git a/lib/addons/kube-state-metrics/index.ts b/lib/addons/kube-state-metrics/index.ts index 9185ab323..0239c12b4 100644 --- a/lib/addons/kube-state-metrics/index.ts +++ b/lib/addons/kube-state-metrics/index.ts @@ -21,7 +21,7 @@ const defaultProps: HelmAddOnProps & KubeStateMetricsAddOnProps = { name: "kube-state-metrics", namespace: "kube-system", chart: "kube-state-metrics", - version: "5.10.0", + version: "5.10.1", release: "kube-state-metrics", repository: "https://prometheus-community.github.io/helm-charts", values: {}, diff --git a/lib/addons/metrics-server/index.ts b/lib/addons/metrics-server/index.ts index 183a8b245..d789180de 100644 --- a/lib/addons/metrics-server/index.ts +++ b/lib/addons/metrics-server/index.ts @@ -21,7 +21,7 @@ export interface MetricsServerAddOnProps extends HelmAddOnUserProps { const defaultProps: HelmAddOnProps & MetricsServerAddOnProps = { chart: 'metrics-server', repository: 'https://kubernetes-sigs.github.io/metrics-server', - version: '3.10.0', + version: '3.11.0', release: 'blueprints-addon-metrics-server', name: 'metrics-server', namespace: 'kube-system', diff --git a/lib/addons/nginx/index.ts b/lib/addons/nginx/index.ts index e23e1f64d..c7ea47127 100644 --- a/lib/addons/nginx/index.ts +++ b/lib/addons/nginx/index.ts @@ -61,7 +61,7 @@ const defaultProps: NginxAddOnProps = { name: "nginx-ingress", chart: "nginx-ingress", release: "blueprints-addon-nginx", - version: "0.18.0", + version: "0.18.1", repository: "https://helm.nginx.com/stable", backendProtocol: 'tcp', crossZoneEnabled: true, diff --git a/lib/addons/opa-gatekeeper/index.ts b/lib/addons/opa-gatekeeper/index.ts index 2c92b0114..7f88ef8e5 100644 --- a/lib/addons/opa-gatekeeper/index.ts +++ b/lib/addons/opa-gatekeeper/index.ts @@ -19,7 +19,7 @@ const defaultProps: HelmAddOnProps = { namespace: 'gatekeeper-system', chart: 'gatekeeper', repository: "https://open-policy-agent.github.io/gatekeeper/charts", - version: '3.12.0' + version: '3.13.0' }; export class OpaGatekeeperAddOn extends HelmAddOn implements ClusterPostDeploy { diff --git a/lib/addons/prometheus-node-exporter/index.ts b/lib/addons/prometheus-node-exporter/index.ts index 1e645df32..9b132a795 100644 --- a/lib/addons/prometheus-node-exporter/index.ts +++ b/lib/addons/prometheus-node-exporter/index.ts @@ -21,7 +21,7 @@ const defaultProps: HelmAddOnProps & PrometheusNodeExporterAddOnProps = { name: "prometheus-node-exporter", namespace: "prometheus-node-exporter", chart: "prometheus-node-exporter", - version: "4.20.0", + version: "4.22.0", release: "prometheus-node-exporter", repository: "https://prometheus-community.github.io/helm-charts", values: {}, diff --git a/lib/addons/vpc-cni/index.ts b/lib/addons/vpc-cni/index.ts index 043124ea5..71a9a5544 100644 --- a/lib/addons/vpc-cni/index.ts +++ b/lib/addons/vpc-cni/index.ts @@ -292,7 +292,7 @@ export interface CustomNetworkingConfig { const defaultProps: CoreAddOnProps = { addOnName: 'vpc-cni', - version: 'v1.13.2-eksbuild.1', + version: 'v1.13.4-eksbuild.1', saName: 'aws-node', namespace: 'kube-system', controlPlaneAddOn: false, diff --git a/lib/cluster-providers/generic-cluster-provider.ts b/lib/cluster-providers/generic-cluster-provider.ts index b7476277a..110fed9c6 100644 --- a/lib/cluster-providers/generic-cluster-provider.ts +++ b/lib/cluster-providers/generic-cluster-provider.ts @@ -2,7 +2,8 @@ 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 {KubectlV27Layer} from "@aws-cdk/lambda-layer-kubectl-v27"; +import { KubectlV26Layer } from "@aws-cdk/lambda-layer-kubectl-v26"; +import { KubectlV27Layer } from "@aws-cdk/lambda-layer-kubectl-v27"; import { Tags } from "aws-cdk-lib"; import * as autoscaling from 'aws-cdk-lib/aws-autoscaling'; import * as ec2 from "aws-cdk-lib/aws-ec2"; @@ -16,7 +17,6 @@ import * as utils from "../utils"; import * as constants from './constants'; import { AutoscalingNodeGroup, ManagedNodeGroup } from "./types"; import assert = require('assert'); -import { KubectlV26Layer } from "@aws-cdk/lambda-layer-kubectl-v26"; export function clusterBuilder() { return new ClusterBuilder(); @@ -38,8 +38,8 @@ export function selectKubectlLayer(scope: Construct, version: eks.KubernetesVers return new KubectlV25Layer(scope, "kubectllayer25"); case "1.26": return new KubectlV26Layer(scope, "kubectllayer26"); - //case "1.27": - //return new KubectlV27Layer(scope, "kubectllayer27"); + case "1.27": + return new KubectlV27Layer(scope, "kubectllayer27"); } const minor = version.version.split('.')[1]; diff --git a/package.json b/package.json index 0eb7c35ce..76b8e13db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aws-quickstart/eks-blueprints", - "version": "1.10.2", + "version": "1.11.0", "license": "Apache-2.0", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -21,15 +21,15 @@ "@types/dot-object": "^2.1.2", "@types/jest": "^29.5.1", "@types/js-yaml": "^4.0.5", - "@types/node": "^18.16.15", + "@types/node": "^18.17.5", "@types/semver": "^7.3.13", "@types/uuid": "^9.0.1", - "@typescript-eslint/eslint-plugin": "^6.1.0", - "@typescript-eslint/parser": "^6.1.0", - "aws-cdk": "^2.88.0", + "@typescript-eslint/eslint-plugin": "^6.4.0", + "@typescript-eslint/parser": "^6.4.0", + "aws-cdk": "^2.92.0", "copyfiles": "^2.4.1", "eslint": "^8.38.0", - "jest": "^29.6.0", + "jest": "^29.6.2", "json-schema-to-typescript": "^13.0.1", "lint": "^1.1.2", "ts-jest": "^29.1.0", @@ -38,18 +38,17 @@ "typescript": "^5.0.4" }, "dependencies": { - "@aws-cdk/lambda-layer-kubectl-v23": "^2.0.7", - "@aws-cdk/lambda-layer-kubectl-v24": "^2.0.202", "@aws-cdk/lambda-layer-kubectl-v25": "^2.0.3", "@aws-cdk/lambda-layer-kubectl-v26": "^2.0.0", - "@aws-sdk/client-eks": "^3.360.0", - "@aws-sdk/client-secrets-manager": "^3.316.0", + "@aws-cdk/lambda-layer-kubectl-v27": "^2.0.0", + "@aws-sdk/client-eks": "^3.391.0", + "@aws-sdk/client-secrets-manager": "^3.391.0", "@types/assert": "^1.5.6", "@types/bcrypt": "^5.0.0", "@types/lodash.clonedeep": "^4.5.7", "@types/uuid": "^9.0.1", - "aws-cdk-lib": "2.88.0", - "bcrypt": "^5.1.0", + "aws-cdk-lib": "2.92.0", + "bcrypt": "^5.1.1", "constructs": "^10.2.33", "dot-object": "^2.1.4", "js-yaml": "4.1.0", @@ -60,10 +59,14 @@ "sync-request": "6.1.0", "ts-deepmerge": "^6.0.3", "ts-md5": "^1.3.1", - "tslog": "^4.8.2", + "tslog": "^4.9.1", "uuid": "^9.0.0", "yaml": "^2.2.1", - "zod": "^3.21.4" + "zod": "^3.22.1" + }, + "optionalDependencies": { + "@aws-cdk/lambda-layer-kubectl-v23": "^2.0.7", + "@aws-cdk/lambda-layer-kubectl-v24": "^2.0.202" }, "overrides": { "semver": "^7.5.3" From bd8965abd3fcf0e73d35acde47aca53eb6519601 Mon Sep 17 00:00:00 2001 From: shapirov Date: Mon, 21 Aug 2023 10:57:42 -0400 Subject: [PATCH 2/4] fixed CDK change and changed kubectl layer resolution --- README.md | 4 ++-- docs/README.md | 4 ++-- docs/getting-started.md | 4 ++-- docs/internal/ci.md | 2 +- examples/blueprint-construct/index.ts | 2 +- lib/cluster-providers/generic-cluster-provider.ts | 4 ++-- lib/pipelines/code-pipeline.ts | 2 +- lib/teams/aws-batch/aws-batch-on-eks-team.ts | 5 ++--- 8 files changed, 13 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 17dfcd298..93b33513d 100644 --- a/README.md +++ b/README.md @@ -44,14 +44,14 @@ aws --version Install CDK matching the current version of the Blueprints QuickStart (which can be found in package.json). ```bash -npm install -g aws-cdk@2.88.0 +npm install -g aws-cdk@2.92.0 ``` Verify the installation. ```bash cdk --version -# must output 2.88.0 +# must output 2.92.0 ``` Create a new CDK project. We use `typescript` for this example. diff --git a/docs/README.md b/docs/README.md index 3b706b3da..206abc082 100644 --- a/docs/README.md +++ b/docs/README.md @@ -44,14 +44,14 @@ aws --version Install CDK matching the current version of the Blueprints QuickStart (which can be found in package.json). ```bash -npm install -g aws-cdk@2.88.0 +npm install -g aws-cdk@2.92.0 ``` Verify the installation. ```bash cdk --version -# must output 2.88.0 +# must output 2.92.0 ``` Create a new CDK project. We use `typescript` for this example. diff --git a/docs/getting-started.md b/docs/getting-started.md index 333a1be2f..bd36c6455 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -26,8 +26,8 @@ Create a directory that represents you project (e.g. `my-blueprints`) and then c ```bash npm install -g n # may require sudo n stable # may require sudo -npm install -g aws-cdk@2.88.0 # may require sudo (Ubuntu) depending on configuration -cdk --version # must produce 2.88.0 +npm install -g aws-cdk@2.92.0 # may require sudo (Ubuntu) depending on configuration +cdk --version # must produce 2.92.0 mkdir my-blueprints cd my-blueprints cdk init app --language typescript diff --git a/docs/internal/ci.md b/docs/internal/ci.md index 59764d9dd..012a8344a 100644 --- a/docs/internal/ci.md +++ b/docs/internal/ci.md @@ -19,7 +19,7 @@ cd cdk-eks-blueprints Install CDK (please review and install any missing [pre-requisites](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html) for your environment) ```sh -npm install -g aws-cdk@2.88.0 +npm install -g aws-cdk@2.92.0 ``` Install the dependencies for this project. diff --git a/examples/blueprint-construct/index.ts b/examples/blueprint-construct/index.ts index c9abaa985..c7218ac10 100644 --- a/examples/blueprint-construct/index.ts +++ b/examples/blueprint-construct/index.ts @@ -193,7 +193,7 @@ export default class BlueprintConstruct { }); const clusterProvider = new blueprints.GenericClusterProvider({ - version: KubernetesVersion.V1_26, + version: KubernetesVersion.V1_27, 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 110fed9c6..579facf10 100644 --- a/lib/cluster-providers/generic-cluster-provider.ts +++ b/lib/cluster-providers/generic-cluster-provider.ts @@ -44,8 +44,8 @@ export function selectKubectlLayer(scope: Construct, version: eks.KubernetesVers const minor = version.version.split('.')[1]; - if(minor && parseInt(minor, 10) > 26) { - return new KubectlV26Layer(scope, "kubectllayer26"); // for all versions above 1.25 use 1.25 kubectl (unless explicitly supported in CDK) + if(minor && parseInt(minor, 10) > 27) { + return new KubectlV27Layer(scope, "kubectllayer27"); // for all versions above 1.27 use 1.27 kubectl (unless explicitly supported in CDK) } return undefined; } diff --git a/lib/pipelines/code-pipeline.ts b/lib/pipelines/code-pipeline.ts index 5fa6b70c3..362bb3b14 100644 --- a/lib/pipelines/code-pipeline.ts +++ b/lib/pipelines/code-pipeline.ts @@ -439,7 +439,7 @@ class CodePipeline { input: codePipelineSource, installCommands: [ 'n stable', - 'npm install -g aws-cdk@2.88.0', + 'npm install -g aws-cdk@2.92.0', 'npm install', ], commands: ['npm run build', 'npx cdk synth ' + app] diff --git a/lib/teams/aws-batch/aws-batch-on-eks-team.ts b/lib/teams/aws-batch/aws-batch-on-eks-team.ts index bb0ba3464..ea4dfaa26 100644 --- a/lib/teams/aws-batch/aws-batch-on-eks-team.ts +++ b/lib/teams/aws-batch/aws-batch-on-eks-team.ts @@ -143,6 +143,7 @@ export class BatchEksTeam extends ApplicationTeam { jobQueue.node.addDependency(computeEnv); } + /** * method to to apply k8s RBAC to the service account used by Batch service role * @param ClusterInfo EKS cluster where to apply the RBAC @@ -150,7 +151,6 @@ export class BatchEksTeam extends ApplicationTeam { * @param createNamespace flag to create namespace if not already created * @returns */ - private setBatchEksResources(clusterInfo: ClusterInfo, namespace: string): Construct { let doc = readYamlDocument(`${__dirname}/aws-batch-rbac-config.ytpl`); @@ -193,7 +193,7 @@ export class BatchEksTeam extends ApplicationTeam { instanceProfileName: ngRole, roles: [ngRole] }); - + const batchComputeEnv = new batch.CfnComputeEnvironment(cluster, "batch-eks-compute-environment", { type: 'MANAGED', computeEnvironmentName: this.batchTeamProps.envName, @@ -215,7 +215,6 @@ export class BatchEksTeam extends ApplicationTeam { }); batchComputeEnv.node.addDependency(instanceProfile); - return batchComputeEnv; } } From 73d52b682ff37e37d0be5bac83787c3bdd84b667 Mon Sep 17 00:00:00 2001 From: shapirov Date: Mon, 21 Aug 2023 11:23:48 -0400 Subject: [PATCH 3/4] testing with CDK 2.92 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 76b8e13db..a45173894 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@types/uuid": "^9.0.1", "@typescript-eslint/eslint-plugin": "^6.4.0", "@typescript-eslint/parser": "^6.4.0", - "aws-cdk": "^2.92.0", + "aws-cdk": "2.92.0", "copyfiles": "^2.4.1", "eslint": "^8.38.0", "jest": "^29.6.2", From 53dfd99bd3f56bbfdfc4214e21a04507364723bd Mon Sep 17 00:00:00 2001 From: shapirov Date: Mon, 21 Aug 2023 11:44:32 -0400 Subject: [PATCH 4/4] downgrading to CDK 2.91.0 --- README.md | 4 ++-- docs/README.md | 4 ++-- docs/getting-started.md | 4 ++-- docs/internal/ci.md | 2 +- lib/pipelines/code-pipeline.ts | 2 +- package.json | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 93b33513d..f1c3fdcdf 100644 --- a/README.md +++ b/README.md @@ -44,14 +44,14 @@ aws --version Install CDK matching the current version of the Blueprints QuickStart (which can be found in package.json). ```bash -npm install -g aws-cdk@2.92.0 +npm install -g aws-cdk@2.91.0 ``` Verify the installation. ```bash cdk --version -# must output 2.92.0 +# must output 2.91.0 ``` Create a new CDK project. We use `typescript` for this example. diff --git a/docs/README.md b/docs/README.md index 206abc082..291741c41 100644 --- a/docs/README.md +++ b/docs/README.md @@ -44,14 +44,14 @@ aws --version Install CDK matching the current version of the Blueprints QuickStart (which can be found in package.json). ```bash -npm install -g aws-cdk@2.92.0 +npm install -g aws-cdk@2.91.0 ``` Verify the installation. ```bash cdk --version -# must output 2.92.0 +# must output 2.91.0 ``` Create a new CDK project. We use `typescript` for this example. diff --git a/docs/getting-started.md b/docs/getting-started.md index bd36c6455..7ab5c9c02 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -26,8 +26,8 @@ Create a directory that represents you project (e.g. `my-blueprints`) and then c ```bash npm install -g n # may require sudo n stable # may require sudo -npm install -g aws-cdk@2.92.0 # may require sudo (Ubuntu) depending on configuration -cdk --version # must produce 2.92.0 +npm install -g aws-cdk@2.91.0 # may require sudo (Ubuntu) depending on configuration +cdk --version # must produce 2.91.0 mkdir my-blueprints cd my-blueprints cdk init app --language typescript diff --git a/docs/internal/ci.md b/docs/internal/ci.md index 012a8344a..6806522e2 100644 --- a/docs/internal/ci.md +++ b/docs/internal/ci.md @@ -19,7 +19,7 @@ cd cdk-eks-blueprints Install CDK (please review and install any missing [pre-requisites](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html) for your environment) ```sh -npm install -g aws-cdk@2.92.0 +npm install -g aws-cdk@2.91.0 ``` Install the dependencies for this project. diff --git a/lib/pipelines/code-pipeline.ts b/lib/pipelines/code-pipeline.ts index 362bb3b14..e82deaa59 100644 --- a/lib/pipelines/code-pipeline.ts +++ b/lib/pipelines/code-pipeline.ts @@ -439,7 +439,7 @@ class CodePipeline { input: codePipelineSource, installCommands: [ 'n stable', - 'npm install -g aws-cdk@2.92.0', + 'npm install -g aws-cdk@2.91.0', 'npm install', ], commands: ['npm run build', 'npx cdk synth ' + app] diff --git a/package.json b/package.json index a45173894..d19619531 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@types/uuid": "^9.0.1", "@typescript-eslint/eslint-plugin": "^6.4.0", "@typescript-eslint/parser": "^6.4.0", - "aws-cdk": "2.92.0", + "aws-cdk": "2.91.0", "copyfiles": "^2.4.1", "eslint": "^8.38.0", "jest": "^29.6.2", @@ -47,7 +47,7 @@ "@types/bcrypt": "^5.0.0", "@types/lodash.clonedeep": "^4.5.7", "@types/uuid": "^9.0.1", - "aws-cdk-lib": "2.92.0", + "aws-cdk-lib": "2.91.0", "bcrypt": "^5.1.1", "constructs": "^10.2.33", "dot-object": "^2.1.4",