From e129d0c788870d9412b6204c382ec109f0a6ea2f Mon Sep 17 00:00:00 2001 From: Pahud Hsieh Date: Wed, 5 Jul 2023 17:49:30 +0000 Subject: [PATCH] support kubectl 1.27 --- .gitattributes | 4 +- ...ubectl-v26.yml => release-kubectl-v27.yml} | 10 +- ...-main.yml => upgrade-kubectl-v27-main.yml} | 12 +- .gitignore | 4 +- .mergify.yml | 4 +- .projen/files.json | 4 +- .projen/tasks.json | 12 +- .projenrc.ts | 2 +- API.md | 114 +++++++++--------- README.md | 12 +- layer/Dockerfile | 4 +- package.json | 20 +-- src/kubectl-layer.ts | 4 +- ...mbda-layer-kubectl-integ-stack.assets.json | 10 +- ...da-layer-kubectl-integ-stack.template.json | 4 +- test/kubectl-layer.integ.ts | 4 +- test/kubectl-layer.test.ts | 6 +- 17 files changed, 115 insertions(+), 115 deletions(-) rename .github/workflows/{release-kubectl-v26.yml => release-kubectl-v27.yml} (98%) rename .github/workflows/{upgrade-kubectl-v26-main.yml => upgrade-kubectl-v27-main.yml} (93%) diff --git a/.gitattributes b/.gitattributes index 2a3dd974..151073bc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,8 +7,8 @@ /.github/workflows/auto-approve.yml linguist-generated /.github/workflows/build.yml linguist-generated /.github/workflows/pull-request-lint.yml linguist-generated -/.github/workflows/release-kubectl-v26.yml linguist-generated -/.github/workflows/upgrade-kubectl-v26-main.yml linguist-generated +/.github/workflows/release-kubectl-v27.yml linguist-generated +/.github/workflows/upgrade-kubectl-v27-main.yml linguist-generated /.gitignore linguist-generated /.gitpod.yml linguist-generated /.mergify.yml linguist-generated diff --git a/.github/workflows/release-kubectl-v26.yml b/.github/workflows/release-kubectl-v27.yml similarity index 98% rename from .github/workflows/release-kubectl-v26.yml rename to .github/workflows/release-kubectl-v27.yml index e2dff389..fd5de3ce 100644 --- a/.github/workflows/release-kubectl-v26.yml +++ b/.github/workflows/release-kubectl-v27.yml @@ -1,10 +1,10 @@ # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". -name: release-kubectl-v26 +name: release-kubectl-v27 on: push: branches: - - kubectl-v26/main + - kubectl-v27/main workflow_dispatch: {} jobs: release: @@ -34,8 +34,8 @@ jobs: node-version: 16.x - name: Install dependencies run: yarn install --check-files --frozen-lockfile - - name: release:kubectl-v26/main - run: npx projen release:kubectl-v26/main + - name: release:kubectl-v27/main + run: npx projen release:kubectl-v27/main - name: Check for new commits id: git_remote run: echo "latest_commit=$(git ls-remote origin -h ${{ github.ref }} | cut -f1)" >> $GITHUB_OUTPUT @@ -252,7 +252,7 @@ jobs: run: mv .repo/dist dist - name: Release env: - GIT_BRANCH: kubectl.26 + GIT_BRANCH: kubectl.27 GIT_USER_NAME: AWS CDK Team GIT_USER_EMAIL: aws-cdk@amazon.com GITHUB_TOKEN: ${{ secrets.PROJEN_GITHUB_TOKEN }} diff --git a/.github/workflows/upgrade-kubectl-v26-main.yml b/.github/workflows/upgrade-kubectl-v27-main.yml similarity index 93% rename from .github/workflows/upgrade-kubectl-v26-main.yml rename to .github/workflows/upgrade-kubectl-v27-main.yml index 8a89b497..f8ed040b 100644 --- a/.github/workflows/upgrade-kubectl-v26-main.yml +++ b/.github/workflows/upgrade-kubectl-v27-main.yml @@ -1,6 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". -name: upgrade-kubectl-v26-main +name: upgrade-kubectl-v27-main on: workflow_dispatch: {} schedule: @@ -17,7 +17,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: kubectl-v26/main + ref: kubectl-v27/main - name: Setup Node.js uses: actions/setup-node@v3 with: @@ -48,7 +48,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: kubectl-v26/main + ref: kubectl-v27/main - name: Download patch uses: actions/download-artifact@v3 with: @@ -74,8 +74,8 @@ jobs: ------ - *Automatically created by projen via the "upgrade-kubectl-v26-main" workflow* - branch: github-actions/upgrade-kubectl-v26-main + *Automatically created by projen via the "upgrade-kubectl-v27-main" workflow* + branch: github-actions/upgrade-kubectl-v27-main title: "chore(deps): upgrade dependencies" labels: auto-approve body: |- @@ -85,7 +85,7 @@ jobs: ------ - *Automatically created by projen via the "upgrade-kubectl-v26-main" workflow* + *Automatically created by projen via the "upgrade-kubectl-v27-main" workflow* author: github-actions committer: github-actions signoff: true diff --git a/.gitignore b/.gitignore index 97274fef..e4de87f2 100644 --- a/.gitignore +++ b/.gitignore @@ -39,8 +39,8 @@ junit.xml !/.github/workflows/build.yml /dist/changelog.md /dist/version.txt -!/.github/workflows/release-kubectl-v26.yml -!/.github/workflows/upgrade-kubectl-v26-main.yml +!/.github/workflows/release-kubectl-v27.yml +!/.github/workflows/upgrade-kubectl-v27-main.yml !/.github/pull_request_template.md !/.npmrc !/test/ diff --git a/.mergify.yml b/.mergify.yml index 7078ae81..bde5dade 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -16,11 +16,11 @@ pull_request_rules: - name: backport patches to kubectl-v21+ branches conditions: - label=backport-to-kubectl-v21+ - - base=kubectl-v26/main + - base=kubectl-v27/main actions: backport: regexes: - - kubectl-v(?!20|26)[\d]*\/main + - kubectl-v(?!20|27)[\d]*\/main labels: - auto-approve - name: Automatic merge on approval and successful build diff --git a/.projen/files.json b/.projen/files.json index 305af2c1..f2eae87e 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -6,8 +6,8 @@ ".github/workflows/auto-approve.yml", ".github/workflows/build.yml", ".github/workflows/pull-request-lint.yml", - ".github/workflows/release-kubectl-v26.yml", - ".github/workflows/upgrade-kubectl-v26-main.yml", + ".github/workflows/release-kubectl-v27.yml", + ".github/workflows/upgrade-kubectl-v27-main.yml", ".gitignore", ".gitpod.yml", ".mergify.yml", diff --git a/.projen/tasks.json b/.projen/tasks.json index 3e62ddc6..4c620ec5 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -32,7 +32,7 @@ "CHANGELOG": "dist/changelog.md", "BUMPFILE": "dist/version.txt", "RELEASETAG": "dist/releasetag.txt", - "RELEASE_TAG_PREFIX": "kubectl-v26", + "RELEASE_TAG_PREFIX": "kubectl-v27", "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep '^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+'" }, "steps": [ @@ -318,13 +318,13 @@ } ] }, - "release:kubectl-v26/main": { - "name": "release:kubectl-v26/main", - "description": "Prepare a release from \"kubectl-v26/main\" branch", + "release:kubectl-v27/main": { + "name": "release:kubectl-v27/main", + "description": "Prepare a release from \"kubectl-v27/main\" branch", "env": { "RELEASE": "true", "MAJOR": "2", - "RELEASE_TAG_PREFIX": "kubectl-v26" + "RELEASE_TAG_PREFIX": "kubectl-v27" }, "steps": [ { @@ -377,7 +377,7 @@ "CHANGELOG": "dist/changelog.md", "BUMPFILE": "dist/version.txt", "RELEASETAG": "dist/releasetag.txt", - "RELEASE_TAG_PREFIX": "kubectl-v26", + "RELEASE_TAG_PREFIX": "kubectl-v27", "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep '^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+'" }, "steps": [ diff --git a/.projenrc.ts b/.projenrc.ts index a94cccff..6f4ddbe5 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -3,7 +3,7 @@ import { NpmAccess } from 'projen/lib/javascript'; import { WorkflowNoDockerPatch } from './projenrc/workflow-no-docker-patch'; // the version of k8s this branch supports -const SPEC_VERSION = '26'; +const SPEC_VERSION = '27'; const releaseWorkflowName = `release-kubectl-v${SPEC_VERSION}`; const defaultReleaseBranchName = `kubectl-v${SPEC_VERSION}/main`; diff --git a/API.md b/API.md index f291ea37..97181943 100644 --- a/API.md +++ b/API.md @@ -1,4 +1,4 @@ -# Lambda Layer with KubeCtl v1.26 +# Lambda Layer with KubeCtl v1.27 --- @@ -9,23 +9,23 @@ -This module exports a single class called `KubectlV26Layer` which is a `lambda.LayerVersion` that +This module exports a single class called `KubectlV27Layer` which is a `lambda.LayerVersion` that bundles the [`kubectl`](https://kubernetes.io/docs/reference/kubectl/kubectl/) and the [`helm`](https://helm.sh/) command line. -> - Helm Version: 3.11.1 -> - Kubectl Version: 1.26.4 +> - Helm Version: 3.12.1 +> - Kubectl Version: 1.27.1 > Usage: ```ts // KubectlLayer bundles the 'kubectl' and 'helm' command lines -import { KubectlV26Layer } from '@aws-cdk/lambda-layer-kubectl-v26'; +import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27'; import * as lambda from 'aws-cdk-lib/aws-lambda'; declare const fn: lambda.Function; -const kubectl = new KubectlV26Layer(this, 'KubectlLayer'); +const kubectl = new KubectlV27Layer(this, 'KubectlLayer'); fn.addLayers(kubectl); ``` @@ -35,32 +35,32 @@ fn.addLayers(kubectl); ## Constructs -### KubectlV26Layer +### KubectlV27Layer A CDK Asset construct that contains `kubectl` and `helm`. -#### Initializers +#### Initializers ```typescript -import { KubectlV26Layer } from '@aws-cdk/lambda-layer-kubectl-v26' +import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27' -new KubectlV26Layer(scope: Construct, id: string) +new KubectlV27Layer(scope: Construct, id: string) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | --- -##### `scope`Required +##### `scope`Required - *Type:* constructs.Construct --- -##### `id`Required +##### `id`Required - *Type:* string @@ -70,13 +70,13 @@ new KubectlV26Layer(scope: Construct, id: string) | **Name** | **Description** | | --- | --- | -| toString | Returns a string representation of this construct. | -| applyRemovalPolicy | Apply the given removal policy to this resource. | -| addPermission | Add permission for this layer version to specific entities. | +| toString | Returns a string representation of this construct. | +| applyRemovalPolicy | Apply the given removal policy to this resource. | +| addPermission | Add permission for this layer version to specific entities. | --- -##### `toString` +##### `toString` ```typescript public toString(): string @@ -84,7 +84,7 @@ public toString(): string Returns a string representation of this construct. -##### `applyRemovalPolicy` +##### `applyRemovalPolicy` ```typescript public applyRemovalPolicy(policy: RemovalPolicy): void @@ -100,13 +100,13 @@ to be replaced. The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). -###### `policy`Required +###### `policy`Required - *Type:* aws-cdk-lib.RemovalPolicy --- -##### `addPermission` +##### `addPermission` ```typescript public addPermission(id: string, permission: LayerVersionPermission): void @@ -121,13 +121,13 @@ Lambda function using the layer (for example, a CloudFormation changeset execution role) also needs to have the ``lambda:GetLayerVersion`` permission on the layer version. -###### `id`Required +###### `id`Required - *Type:* string --- -###### `permission`Required +###### `permission`Required - *Type:* aws-cdk-lib.aws_lambda.LayerVersionPermission @@ -137,24 +137,24 @@ permission on the layer version. | **Name** | **Description** | | --- | --- | -| isConstruct | Checks if `x` is a construct. | -| isResource | Check whether the given construct is a Resource. | -| fromLayerVersionArn | Imports a layer version by ARN. | -| fromLayerVersionAttributes | Imports a Layer that has been defined externally. | +| isConstruct | Checks if `x` is a construct. | +| isResource | Check whether the given construct is a Resource. | +| fromLayerVersionArn | Imports a layer version by ARN. | +| fromLayerVersionAttributes | Imports a Layer that has been defined externally. | --- -##### ~~`isConstruct`~~ +##### ~~`isConstruct`~~ ```typescript -import { KubectlV26Layer } from '@aws-cdk/lambda-layer-kubectl-v26' +import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27' -KubectlV26Layer.isConstruct(x: any) +KubectlV27Layer.isConstruct(x: any) ``` Checks if `x` is a construct. -###### `x`Required +###### `x`Required - *Type:* any @@ -162,63 +162,63 @@ Any object. --- -##### `isResource` +##### `isResource` ```typescript -import { KubectlV26Layer } from '@aws-cdk/lambda-layer-kubectl-v26' +import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27' -KubectlV26Layer.isResource(construct: IConstruct) +KubectlV27Layer.isResource(construct: IConstruct) ``` Check whether the given construct is a Resource. -###### `construct`Required +###### `construct`Required - *Type:* constructs.IConstruct --- -##### `fromLayerVersionArn` +##### `fromLayerVersionArn` ```typescript -import { KubectlV26Layer } from '@aws-cdk/lambda-layer-kubectl-v26' +import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27' -KubectlV26Layer.fromLayerVersionArn(scope: Construct, id: string, layerVersionArn: string) +KubectlV27Layer.fromLayerVersionArn(scope: Construct, id: string, layerVersionArn: string) ``` Imports a layer version by ARN. Assumes it is compatible with all Lambda runtimes. -###### `scope`Required +###### `scope`Required - *Type:* constructs.Construct --- -###### `id`Required +###### `id`Required - *Type:* string --- -###### `layerVersionArn`Required +###### `layerVersionArn`Required - *Type:* string --- -##### `fromLayerVersionAttributes` +##### `fromLayerVersionAttributes` ```typescript -import { KubectlV26Layer } from '@aws-cdk/lambda-layer-kubectl-v26' +import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27' -KubectlV26Layer.fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes) +KubectlV27Layer.fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes) ``` Imports a Layer that has been defined externally. -###### `scope`Required +###### `scope`Required - *Type:* constructs.Construct @@ -226,7 +226,7 @@ the parent Construct that will use the imported layer. --- -###### `id`Required +###### `id`Required - *Type:* string @@ -234,7 +234,7 @@ the id of the imported layer in the construct tree. --- -###### `attrs`Required +###### `attrs`Required - *Type:* aws-cdk-lib.aws_lambda.LayerVersionAttributes @@ -246,15 +246,15 @@ the properties of the imported layer. | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | constructs.Node | The tree node. | -| env | aws-cdk-lib.ResourceEnvironment | The environment this resource belongs to. | -| stack | aws-cdk-lib.Stack | The stack in which this resource is defined. | -| layerVersionArn | string | The ARN of the Lambda Layer version that this Layer defines. | -| compatibleRuntimes | aws-cdk-lib.aws_lambda.Runtime[] | The runtimes compatible with this Layer. | +| node | constructs.Node | The tree node. | +| env | aws-cdk-lib.ResourceEnvironment | The environment this resource belongs to. | +| stack | aws-cdk-lib.Stack | The stack in which this resource is defined. | +| layerVersionArn | string | The ARN of the Lambda Layer version that this Layer defines. | +| compatibleRuntimes | aws-cdk-lib.aws_lambda.Runtime[] | The runtimes compatible with this Layer. | --- -##### `node`Required +##### `node`Required ```typescript public readonly node: Node; @@ -266,7 +266,7 @@ The tree node. --- -##### `env`Required +##### `env`Required ```typescript public readonly env: ResourceEnvironment; @@ -285,7 +285,7 @@ that might be different than the stack they were imported into. --- -##### `stack`Required +##### `stack`Required ```typescript public readonly stack: Stack; @@ -297,7 +297,7 @@ The stack in which this resource is defined. --- -##### `layerVersionArn`Required +##### `layerVersionArn`Required ```typescript public readonly layerVersionArn: string; @@ -309,7 +309,7 @@ The ARN of the Lambda Layer version that this Layer defines. --- -##### `compatibleRuntimes`Optional +##### `compatibleRuntimes`Optional ```typescript public readonly compatibleRuntimes: Runtime[]; diff --git a/README.md b/README.md index 4304b2fe..6ea5d942 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Lambda Layer with KubeCtl v1.26 +# Lambda Layer with KubeCtl v1.27 --- @@ -9,23 +9,23 @@ -This module exports a single class called `KubectlV26Layer` which is a `lambda.LayerVersion` that +This module exports a single class called `KubectlV27Layer` which is a `lambda.LayerVersion` that bundles the [`kubectl`](https://kubernetes.io/docs/reference/kubectl/kubectl/) and the [`helm`](https://helm.sh/) command line. -> - Helm Version: 3.11.1 -> - Kubectl Version: 1.26.4 +> - Helm Version: 3.12.1 +> - Kubectl Version: 1.27.1 > Usage: ```ts // KubectlLayer bundles the 'kubectl' and 'helm' command lines -import { KubectlV26Layer } from '@aws-cdk/lambda-layer-kubectl-v26'; +import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27'; import * as lambda from 'aws-cdk-lib/aws-lambda'; declare const fn: lambda.Function; -const kubectl = new KubectlV26Layer(this, 'KubectlLayer'); +const kubectl = new KubectlV27Layer(this, 'KubectlLayer'); fn.addLayers(kubectl); ``` diff --git a/layer/Dockerfile b/layer/Dockerfile index 5cf404b8..a82e3fba 100644 --- a/layer/Dockerfile +++ b/layer/Dockerfile @@ -5,8 +5,8 @@ FROM public.ecr.aws/lambda/provided:latest # versions # -ARG KUBECTL_VERSION=1.26.4 -ARG HELM_VERSION=3.11.1 +ARG KUBECTL_VERSION=1.27.1 +ARG HELM_VERSION=3.12.1 USER root RUN mkdir -p /opt diff --git a/package.json b/package.json index 31be6c96..23c468e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@aws-cdk/lambda-layer-kubectl-v26", - "description": "A Lambda Layer that contains kubectl v1.26", + "name": "@aws-cdk/lambda-layer-kubectl-v27", + "description": "A Lambda Layer that contains kubectl v1.27", "repository": { "type": "git", "url": "https://github.com/cdklabs/awscdk-asset-kubectl.git" @@ -31,7 +31,7 @@ "post-compile": "npx projen post-compile", "post-upgrade": "npx projen post-upgrade", "pre-compile": "npx projen pre-compile", - "release:kubectl-v26/main": "npx projen release:kubectl-v26/main", + "release:kubectl-v27/main": "npx projen release:kubectl-v27/main", "test": "npx projen test", "test:watch": "npx projen test:watch", "unbump": "npx projen unbump", @@ -134,23 +134,23 @@ "outdir": "dist", "targets": { "java": { - "package": "software.amazon.awscdk.cdk.lambdalayer.kubectl.v26", + "package": "software.amazon.awscdk.cdk.lambdalayer.kubectl.v27", "maven": { "groupId": "software.amazon.awscdk", - "artifactId": "cdk-lambda-layer-kubectl-v26" + "artifactId": "cdk-lambda-layer-kubectl-v27" } }, "python": { - "distName": "aws-cdk.lambda-layer-kubectl-v26", - "module": "aws_cdk.lambda_layer_kubectl_v26" + "distName": "aws-cdk.lambda-layer-kubectl-v27", + "module": "aws_cdk.lambda_layer_kubectl_v27" }, "dotnet": { - "namespace": "Amazon.CDK.LambdaLayer.KubectlV26", - "packageId": "Amazon.CDK.LambdaLayer.KubectlV26" + "namespace": "Amazon.CDK.LambdaLayer.KubectlV27", + "packageId": "Amazon.CDK.LambdaLayer.KubectlV27" }, "go": { "moduleName": "github.com/cdklabs/awscdk-kubectl-go", - "packageName": "kubectlv26" + "packageName": "kubectlv27" } }, "tsc": { diff --git a/src/kubectl-layer.ts b/src/kubectl-layer.ts index a1efacbc..4192499f 100644 --- a/src/kubectl-layer.ts +++ b/src/kubectl-layer.ts @@ -5,13 +5,13 @@ import { assetHash, ASSET_FILE } from './_asset'; /** * A CDK Asset construct that contains `kubectl` and `helm`. */ -export class KubectlV26Layer extends lambda.LayerVersion { +export class KubectlV27Layer extends lambda.LayerVersion { constructor(scope: Construct, id: string) { super(scope, id, { code: lambda.Code.fromAsset(ASSET_FILE, { assetHash: assetHash(), }), - description: '/opt/kubectl/kubectl 1.26; /opt/helm/helm 3.11', + description: '/opt/kubectl/kubectl 1.27; /opt/helm/helm 3.12', license: 'Apache-2.0', }); } diff --git a/test/kubectl-layer.integ.snapshot/lambda-layer-kubectl-integ-stack.assets.json b/test/kubectl-layer.integ.snapshot/lambda-layer-kubectl-integ-stack.assets.json index c59e9a56..336d88f4 100644 --- a/test/kubectl-layer.integ.snapshot/lambda-layer-kubectl-integ-stack.assets.json +++ b/test/kubectl-layer.integ.snapshot/lambda-layer-kubectl-integ-stack.assets.json @@ -1,15 +1,15 @@ { "version": "20.0.0", "files": { - "2873922b2920bdb6f113a1deaf12a0572a881113a1d89d7b328db438adead07f": { + "8e18eb5caccd2617fb76e648fa6a35dc0ece98c4681942bc6861f41afdff6a1b": { "source": { - "path": "asset.2873922b2920bdb6f113a1deaf12a0572a881113a1d89d7b328db438adead07f.zip", + "path": "asset.8e18eb5caccd2617fb76e648fa6a35dc0ece98c4681942bc6861f41afdff6a1b.zip", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2873922b2920bdb6f113a1deaf12a0572a881113a1d89d7b328db438adead07f.zip", + "objectKey": "8e18eb5caccd2617fb76e648fa6a35dc0ece98c4681942bc6861f41afdff6a1b.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -40,7 +40,7 @@ } } }, - "0b69bec8c78e63abd08d634a0f862061ca7bdffb79e064ee777250c67bcdd9d0": { + "17d6792cc2b9ebe5097b58ca5e612cea098f78a797db6c6484916c68269e37bb": { "source": { "path": "lambda-layer-kubectl-integ-stack.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0b69bec8c78e63abd08d634a0f862061ca7bdffb79e064ee777250c67bcdd9d0.json", + "objectKey": "17d6792cc2b9ebe5097b58ca5e612cea098f78a797db6c6484916c68269e37bb.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/test/kubectl-layer.integ.snapshot/lambda-layer-kubectl-integ-stack.template.json b/test/kubectl-layer.integ.snapshot/lambda-layer-kubectl-integ-stack.template.json index 460d597c..e24fe0da 100644 --- a/test/kubectl-layer.integ.snapshot/lambda-layer-kubectl-integ-stack.template.json +++ b/test/kubectl-layer.integ.snapshot/lambda-layer-kubectl-integ-stack.template.json @@ -7,9 +7,9 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2873922b2920bdb6f113a1deaf12a0572a881113a1d89d7b328db438adead07f.zip" + "S3Key": "8e18eb5caccd2617fb76e648fa6a35dc0ece98c4681942bc6861f41afdff6a1b.zip" }, - "Description": "/opt/kubectl/kubectl 1.26; /opt/helm/helm 3.11", + "Description": "/opt/kubectl/kubectl 1.27; /opt/helm/helm 3.12", "LicenseInfo": "Apache-2.0" } }, diff --git a/test/kubectl-layer.integ.ts b/test/kubectl-layer.integ.ts index a9d91200..3b8ce6df 100644 --- a/test/kubectl-layer.integ.ts +++ b/test/kubectl-layer.integ.ts @@ -3,7 +3,7 @@ import * as cdk from 'aws-cdk-lib'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as cr from 'aws-cdk-lib/custom-resources'; -import { KubectlV26Layer } from '../lib'; +import { KubectlV27Layer } from '../lib'; /** * Test verifies that kubectl and helm are invoked successfully inside Lambda runtime. @@ -11,7 +11,7 @@ import { KubectlV26Layer } from '../lib'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'lambda-layer-kubectl-integ-stack'); -const layer = new KubectlV26Layer(stack, 'KubectlLayer'); +const layer = new KubectlV27Layer(stack, 'KubectlLayer'); const runtimes = [ lambda.Runtime.PYTHON_3_7, diff --git a/test/kubectl-layer.test.ts b/test/kubectl-layer.test.ts index 7ed411d1..556c9ed6 100644 --- a/test/kubectl-layer.test.ts +++ b/test/kubectl-layer.test.ts @@ -1,17 +1,17 @@ import { Stack } from 'aws-cdk-lib'; import { Template } from 'aws-cdk-lib/assertions'; -import { KubectlV26Layer } from '../lib'; +import { KubectlV27Layer } from '../lib'; test('synthesized to a layer version', () => { // GIVEN const stack = new Stack(); // WHEN - new KubectlV26Layer(stack, 'MyLayer'); + new KubectlV27Layer(stack, 'MyLayer'); // THEN Template.fromStack(stack).hasResourceProperties('AWS::Lambda::LayerVersion', { - Description: '/opt/kubectl/kubectl 1.26; /opt/helm/helm 3.11', + Description: '/opt/kubectl/kubectl 1.27; /opt/helm/helm 3.12', }); });