diff --git a/.gitattributes b/.gitattributes index e5f02838..a51fc56b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,10 +7,10 @@ /.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-v29.yml linguist-generated -/.github/workflows/upgrade-kubectl-v27-main.yml linguist-generated +/.github/workflows/release-kubectl-v30.yml linguist-generated /.github/workflows/upgrade-kubectl-v28-main.yml linguist-generated /.github/workflows/upgrade-kubectl-v29-main.yml linguist-generated +/.github/workflows/upgrade-kubectl-v30-main.yml linguist-generated /.gitignore linguist-generated /.gitpod.yml linguist-generated /.mergify.yml linguist-generated diff --git a/.github/workflows/release-kubectl-v29.yml b/.github/workflows/release-kubectl-v30.yml similarity index 98% rename from .github/workflows/release-kubectl-v29.yml rename to .github/workflows/release-kubectl-v30.yml index 5569d456..688728f8 100644 --- a/.github/workflows/release-kubectl-v29.yml +++ b/.github/workflows/release-kubectl-v30.yml @@ -1,10 +1,10 @@ # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". -name: release-kubectl-v29 +name: release-kubectl-v30 on: push: branches: - - kubectl-v29/main + - kubectl-v30/main workflow_dispatch: {} jobs: release: @@ -35,8 +35,8 @@ jobs: node-version: 18.x - name: Install dependencies run: yarn install --check-files --frozen-lockfile - - name: release:kubectl-v29/main - run: npx projen release:kubectl-v29/main + - name: release:kubectl-v30/main + run: npx projen release:kubectl-v30/main - name: Check if version has already been tagged id: check_tag_exists run: |- @@ -270,7 +270,7 @@ jobs: run: mv .repo/dist dist - name: Release env: - GIT_BRANCH: kubectl.29 + GIT_BRANCH: kubectl.30 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-v27-main.yml b/.github/workflows/upgrade-kubectl-v30-main.yml similarity index 93% rename from .github/workflows/upgrade-kubectl-v27-main.yml rename to .github/workflows/upgrade-kubectl-v30-main.yml index 5cc6730c..91707f03 100644 --- a/.github/workflows/upgrade-kubectl-v27-main.yml +++ b/.github/workflows/upgrade-kubectl-v30-main.yml @@ -1,6 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". -name: upgrade-kubectl-v27-main +name: upgrade-kubectl-v30-main on: workflow_dispatch: {} schedule: @@ -17,7 +17,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: kubectl-v27/main + ref: kubectl-v30/main - name: Setup Node.js uses: actions/setup-node@v4 with: @@ -50,7 +50,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: kubectl-v27/main + ref: kubectl-v30/main - name: Download patch uses: actions/download-artifact@v4 with: @@ -76,8 +76,8 @@ jobs: ------ - *Automatically created by projen via the "upgrade-kubectl-v27-main" workflow* - branch: github-actions/upgrade-kubectl-v27-main + *Automatically created by projen via the "upgrade-kubectl-v30-main" workflow* + branch: github-actions/upgrade-kubectl-v30-main title: "chore(deps): upgrade dependencies" labels: auto-approve body: |- @@ -87,7 +87,7 @@ jobs: ------ - *Automatically created by projen via the "upgrade-kubectl-v27-main" workflow* + *Automatically created by projen via the "upgrade-kubectl-v30-main" workflow* author: github-actions committer: github-actions signoff: true diff --git a/.gitignore b/.gitignore index 03bf1011..4d24a087 100644 --- a/.gitignore +++ b/.gitignore @@ -38,10 +38,10 @@ junit.xml !/.github/workflows/build.yml /dist/changelog.md /dist/version.txt -!/.github/workflows/release-kubectl-v29.yml +!/.github/workflows/release-kubectl-v30.yml +!/.github/workflows/upgrade-kubectl-v30-main.yml !/.github/workflows/upgrade-kubectl-v29-main.yml !/.github/workflows/upgrade-kubectl-v28-main.yml -!/.github/workflows/upgrade-kubectl-v27-main.yml !/.github/pull_request_template.md !/test/ !/tsconfig.dev.json diff --git a/.mergify.yml b/.mergify.yml index b1840920..3e89232c 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-v29/main + - base=kubectl-v30/main actions: backport: regexes: - - kubectl-v(?!20|29)[\d]*\/main + - kubectl-v(?!20|30)[\d]*\/main labels: - auto-approve - name: Automatic merge on approval and successful build diff --git a/.projen/deps.json b/.projen/deps.json index 33eba2a7..2cc86ff3 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -104,7 +104,7 @@ }, { "name": "aws-cdk-lib", - "version": "^2.28.0", + "version": "^2.85.0", "type": "peer" }, { diff --git a/.projen/files.json b/.projen/files.json index 8c9a0d95..baab13e3 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -6,10 +6,10 @@ ".github/workflows/auto-approve.yml", ".github/workflows/build.yml", ".github/workflows/pull-request-lint.yml", - ".github/workflows/release-kubectl-v29.yml", - ".github/workflows/upgrade-kubectl-v27-main.yml", + ".github/workflows/release-kubectl-v30.yml", ".github/workflows/upgrade-kubectl-v28-main.yml", ".github/workflows/upgrade-kubectl-v29-main.yml", + ".github/workflows/upgrade-kubectl-v30-main.yml", ".gitignore", ".gitpod.yml", ".mergify.yml", diff --git a/.projen/tasks.json b/.projen/tasks.json index 921320ef..52b22be5 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-v29", + "RELEASE_TAG_PREFIX": "kubectl-v30", "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep '^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+'" }, "steps": [ @@ -319,13 +319,13 @@ } ] }, - "release:kubectl-v29/main": { - "name": "release:kubectl-v29/main", - "description": "Prepare a release from \"kubectl-v29/main\" branch", + "release:kubectl-v30/main": { + "name": "release:kubectl-v30/main", + "description": "Prepare a release from \"kubectl-v30/main\" branch", "env": { "RELEASE": "true", "MAJOR": "2", - "RELEASE_TAG_PREFIX": "kubectl-v29" + "RELEASE_TAG_PREFIX": "kubectl-v30" }, "steps": [ { @@ -378,7 +378,7 @@ "CHANGELOG": "dist/changelog.md", "BUMPFILE": "dist/version.txt", "RELEASETAG": "dist/releasetag.txt", - "RELEASE_TAG_PREFIX": "kubectl-v29", + "RELEASE_TAG_PREFIX": "kubectl-v30", "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 e5ba5ceb..ccf30260 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 = '29'; +const SPEC_VERSION = '30'; const releaseWorkflowName = `release-kubectl-v${SPEC_VERSION}`; const defaultReleaseBranchName = `kubectl-v${SPEC_VERSION}/main`; @@ -11,7 +11,7 @@ const project = new awscdk.AwsCdkConstructLibrary({ projenrcTs: true, author: 'Amazon Web Services', authorAddress: 'aws-cdk-dev@amazon.com', - cdkVersion: '2.28.0', + cdkVersion: '2.85.0', name: `@aws-cdk/lambda-layer-kubectl-v${SPEC_VERSION}`, description: `A Lambda Layer that contains kubectl v1.${SPEC_VERSION}`, repositoryUrl: 'https://github.com/cdklabs/awscdk-asset-kubectl.git', diff --git a/API.md b/API.md index 44f65749..8cbe159b 100644 --- a/API.md +++ b/API.md @@ -1,4 +1,4 @@ -# Lambda Layer with KubeCtl v1.29 +# Lambda Layer with KubeCtl v1.30 --- @@ -9,23 +9,23 @@ -This module exports a single class called `KubectlV29Layer` which is a `lambda.LayerVersion` that +This module exports a single class called `KubectlV30Layer` 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.14.0 -> - Kubectl Version: 1.29.1 +> - Helm Version: 3.15.1 +> - Kubectl Version: 1.30.0 > Usage: ```ts // KubectlLayer bundles the 'kubectl' and 'helm' command lines -import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29'; +import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30'; import * as lambda from 'aws-cdk-lib/aws-lambda'; declare const fn: lambda.Function; -const kubectl = new KubectlV29Layer(this, 'KubectlLayer'); +const kubectl = new KubectlV30Layer(this, 'KubectlLayer'); fn.addLayers(kubectl); ``` @@ -35,32 +35,32 @@ fn.addLayers(kubectl); ## Constructs -### KubectlV29Layer +### KubectlV30Layer A CDK Asset construct that contains `kubectl` and `helm`. -#### Initializers +#### Initializers ```typescript -import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29' +import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30' -new KubectlV29Layer(scope: Construct, id: string) +new KubectlV30Layer(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 KubectlV29Layer(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,25 @@ 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. | +| isOwnedResource | Returns true if the construct was created by CDK, and false otherwise. | +| 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 { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29' +import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30' -KubectlV29Layer.isConstruct(x: any) +KubectlV30Layer.isConstruct(x: any) ``` Checks if `x` is a construct. -###### `x`Required +###### `x`Required - *Type:* any @@ -162,63 +163,79 @@ Any object. --- -##### `isResource` +##### `isOwnedResource` ```typescript -import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29' +import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30' -KubectlV29Layer.isResource(construct: IConstruct) +KubectlV30Layer.isOwnedResource(construct: IConstruct) +``` + +Returns true if the construct was created by CDK, and false otherwise. + +###### `construct`Required + +- *Type:* constructs.IConstruct + +--- + +##### `isResource` + +```typescript +import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30' + +KubectlV30Layer.isResource(construct: IConstruct) ``` Check whether the given construct is a Resource. -###### `construct`Required +###### `construct`Required - *Type:* constructs.IConstruct --- -##### `fromLayerVersionArn` +##### `fromLayerVersionArn` ```typescript -import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29' +import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30' -KubectlV29Layer.fromLayerVersionArn(scope: Construct, id: string, layerVersionArn: string) +KubectlV30Layer.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 { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29' +import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30' -KubectlV29Layer.fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes) +KubectlV30Layer.fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes) ``` Imports a Layer that has been defined externally. -###### `scope`Required +###### `scope`Required - *Type:* constructs.Construct @@ -226,7 +243,7 @@ the parent Construct that will use the imported layer. --- -###### `id`Required +###### `id`Required - *Type:* string @@ -234,7 +251,7 @@ the id of the imported layer in the construct tree. --- -###### `attrs`Required +###### `attrs`Required - *Type:* aws-cdk-lib.aws_lambda.LayerVersionAttributes @@ -246,15 +263,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 +283,7 @@ The tree node. --- -##### `env`Required +##### `env`Required ```typescript public readonly env: ResourceEnvironment; @@ -285,7 +302,7 @@ that might be different than the stack they were imported into. --- -##### `stack`Required +##### `stack`Required ```typescript public readonly stack: Stack; @@ -297,7 +314,7 @@ The stack in which this resource is defined. --- -##### `layerVersionArn`Required +##### `layerVersionArn`Required ```typescript public readonly layerVersionArn: string; @@ -309,7 +326,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 bf0e1977..9d4b713b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Lambda Layer with KubeCtl v1.29 +# Lambda Layer with KubeCtl v1.30 --- @@ -9,23 +9,23 @@ -This module exports a single class called `KubectlV29Layer` which is a `lambda.LayerVersion` that +This module exports a single class called `KubectlV30Layer` 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.14.0 -> - Kubectl Version: 1.29.1 +> - Helm Version: 3.15.1 +> - Kubectl Version: 1.30.0 > Usage: ```ts // KubectlLayer bundles the 'kubectl' and 'helm' command lines -import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29'; +import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30'; import * as lambda from 'aws-cdk-lib/aws-lambda'; declare const fn: lambda.Function; -const kubectl = new KubectlV29Layer(this, 'KubectlLayer'); +const kubectl = new KubectlV30Layer(this, 'KubectlLayer'); fn.addLayers(kubectl); ``` diff --git a/layer/Dockerfile b/layer/Dockerfile index 07d080bd..337041d8 100644 --- a/layer/Dockerfile +++ b/layer/Dockerfile @@ -5,8 +5,8 @@ FROM public.ecr.aws/lambda/provided:latest # versions # -ARG KUBECTL_VERSION=1.29.1 -ARG HELM_VERSION=3.14.0 +ARG KUBECTL_VERSION=1.30.0 +ARG HELM_VERSION=3.15.1 USER root RUN mkdir -p /opt diff --git a/package.json b/package.json index 54196dfa..c390bbe3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@aws-cdk/lambda-layer-kubectl-v29", - "description": "A Lambda Layer that contains kubectl v1.29", + "name": "@aws-cdk/lambda-layer-kubectl-v30", + "description": "A Lambda Layer that contains kubectl v1.30", "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-v29/main": "npx projen release:kubectl-v29/main", + "release:kubectl-v30/main": "npx projen release:kubectl-v30/main", "test": "npx projen test", "test:watch": "npx projen test:watch", "unbump": "npx projen unbump", @@ -50,7 +50,7 @@ "@typescript-eslint/eslint-plugin": "^6", "@typescript-eslint/parser": "^6", "aws-cdk": "^2", - "aws-cdk-lib": "2.28.0", + "aws-cdk-lib": "2.85.0", "constructs": "10.0.5", "eslint": "^8", "eslint-import-resolver-typescript": "^3.6.1", @@ -69,7 +69,7 @@ "typescript": "^4.9.5" }, "peerDependencies": { - "aws-cdk-lib": "^2.28.0", + "aws-cdk-lib": "^2.85.0", "constructs": "^10.0.5" }, "resolutions": { @@ -133,23 +133,23 @@ "outdir": "dist", "targets": { "java": { - "package": "software.amazon.awscdk.cdk.lambdalayer.kubectl.v29", + "package": "software.amazon.awscdk.cdk.lambdalayer.kubectl.v30", "maven": { "groupId": "software.amazon.awscdk", - "artifactId": "cdk-lambda-layer-kubectl-v29" + "artifactId": "cdk-lambda-layer-kubectl-v30" } }, "python": { - "distName": "aws-cdk.lambda-layer-kubectl-v29", - "module": "aws_cdk.lambda_layer_kubectl_v29" + "distName": "aws-cdk.lambda-layer-kubectl-v30", + "module": "aws_cdk.lambda_layer_kubectl_v30" }, "dotnet": { - "namespace": "Amazon.CDK.LambdaLayer.KubectlV29", - "packageId": "Amazon.CDK.LambdaLayer.KubectlV29" + "namespace": "Amazon.CDK.LambdaLayer.KubectlV30", + "packageId": "Amazon.CDK.LambdaLayer.KubectlV30" }, "go": { "moduleName": "github.com/cdklabs/awscdk-kubectl-go", - "packageName": "kubectlv29" + "packageName": "kubectlv30" } }, "tsc": { diff --git a/src/kubectl-layer.ts b/src/kubectl-layer.ts index 7f40aa31..b3be798c 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 KubectlV29Layer extends lambda.LayerVersion { +export class KubectlV30Layer extends lambda.LayerVersion { constructor(scope: Construct, id: string) { super(scope, id, { code: lambda.Code.fromAsset(ASSET_FILE, { assetHash: assetHash(), }), - description: '/opt/kubectl/kubectl 1.29; /opt/helm/helm 3.14', + description: '/opt/kubectl/kubectl 1.30; /opt/helm/helm 3.15', 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 7b45e7d1..9a0952e6 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", + "version": "32.0.0", "files": { - "b5925bba477fd1ac27c3a695a9f6ece293bd0ae6940bc65a5b99008ab54f60f7": { + "bfbdea4d45250c8162c204fe0687cb775e24d61c895ad89e4ca6e9a7fc90b0f0": { "source": { - "path": "asset.b5925bba477fd1ac27c3a695a9f6ece293bd0ae6940bc65a5b99008ab54f60f7.zip", + "path": "asset.bfbdea4d45250c8162c204fe0687cb775e24d61c895ad89e4ca6e9a7fc90b0f0.zip", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b5925bba477fd1ac27c3a695a9f6ece293bd0ae6940bc65a5b99008ab54f60f7.zip", + "objectKey": "bfbdea4d45250c8162c204fe0687cb775e24d61c895ad89e4ca6e9a7fc90b0f0.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,20 +27,20 @@ } } }, - "eaeb69bc290b516fe3b049f89d6118b22249df682fbabf56af300cf345198574": { + "8e3d635893ea17fa3158623489cd42c680fad925b38de1ef51cb10d84f6e245e": { "source": { - "path": "asset.eaeb69bc290b516fe3b049f89d6118b22249df682fbabf56af300cf345198574", + "path": "asset.8e3d635893ea17fa3158623489cd42c680fad925b38de1ef51cb10d84f6e245e", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "eaeb69bc290b516fe3b049f89d6118b22249df682fbabf56af300cf345198574.zip", + "objectKey": "8e3d635893ea17fa3158623489cd42c680fad925b38de1ef51cb10d84f6e245e.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "7793bea638b52e9d8f5e0c5a129f4337959bf7bdf7408d2035cc2ddfdf4f7d56": { + "cbb227e141fa115ee51137c7825926f41a8a95b5bbabdd3cb98a14a8e597e31d": { "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": "7793bea638b52e9d8f5e0c5a129f4337959bf7bdf7408d2035cc2ddfdf4f7d56.json", + "objectKey": "cbb227e141fa115ee51137c7825926f41a8a95b5bbabdd3cb98a14a8e597e31d.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 825c2c05..5936fad9 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,13 +7,13 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b5925bba477fd1ac27c3a695a9f6ece293bd0ae6940bc65a5b99008ab54f60f7.zip" + "S3Key": "bfbdea4d45250c8162c204fe0687cb775e24d61c895ad89e4ca6e9a7fc90b0f0.zip" }, - "Description": "/opt/kubectl/kubectl 1.29; /opt/helm/helm 3.14", + "Description": "/opt/kubectl/kubectl 1.30; /opt/helm/helm 3.15", "LicenseInfo": "Apache-2.0" } }, - "Lambdapython37ServiceRoleB5A704D4": { + "Lambdapython39ServiceRoleE2CFED77": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -44,7 +44,7 @@ ] } }, - "Lambdapython3780349E0A": { + "Lambdapython39426A0480": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { @@ -55,7 +55,7 @@ }, "Role": { "Fn::GetAtt": [ - "Lambdapython37ServiceRoleB5A704D4", + "Lambdapython39ServiceRoleE2CFED77", "Arn" ] }, @@ -66,14 +66,14 @@ } ], "MemorySize": 512, - "Runtime": "python3.7", + "Runtime": "python3.9", "Timeout": 30 }, "DependsOn": [ - "Lambdapython37ServiceRoleB5A704D4" + "Lambdapython39ServiceRoleE2CFED77" ] }, - "Providerpython37frameworkonEventServiceRole9EA6B2B0": { + "Providerpython39frameworkonEventServiceRoleA299F5C1": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -104,7 +104,7 @@ ] } }, - "Providerpython37frameworkonEventServiceRoleDefaultPolicyA9099DC2": { + "Providerpython39frameworkonEventServiceRoleDefaultPolicy16A4767C": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -115,7 +115,7 @@ "Resource": [ { "Fn::GetAtt": [ - "Lambdapython3780349E0A", + "Lambdapython39426A0480", "Arn" ] }, @@ -125,7 +125,7 @@ [ { "Fn::GetAtt": [ - "Lambdapython3780349E0A", + "Lambdapython39426A0480", "Arn" ] }, @@ -138,55 +138,63 @@ ], "Version": "2012-10-17" }, - "PolicyName": "Providerpython37frameworkonEventServiceRoleDefaultPolicyA9099DC2", + "PolicyName": "Providerpython39frameworkonEventServiceRoleDefaultPolicy16A4767C", "Roles": [ { - "Ref": "Providerpython37frameworkonEventServiceRole9EA6B2B0" + "Ref": "Providerpython39frameworkonEventServiceRoleA299F5C1" } ] } }, - "Providerpython37frameworkonEvent3AA4F69E": { + "Providerpython39frameworkonEvent00AFA742": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eaeb69bc290b516fe3b049f89d6118b22249df682fbabf56af300cf345198574.zip" + "S3Key": "8e3d635893ea17fa3158623489cd42c680fad925b38de1ef51cb10d84f6e245e.zip" }, "Role": { "Fn::GetAtt": [ - "Providerpython37frameworkonEventServiceRole9EA6B2B0", + "Providerpython39frameworkonEventServiceRoleA299F5C1", "Arn" ] }, - "Description": "AWS CDK resource provider framework - onEvent (lambda-layer-kubectl-integ-stack/Providerpython3.7)", + "Description": "AWS CDK resource provider framework - onEvent (lambda-layer-kubectl-integ-stack/Providerpython3.9)", "Environment": { "Variables": { "USER_ON_EVENT_FUNCTION_ARN": { "Fn::GetAtt": [ - "Lambdapython3780349E0A", + "Lambdapython39426A0480", "Arn" ] } } }, "Handler": "framework.onEvent", - "Runtime": "nodejs14.x", + "Runtime": { + "Fn::FindInMap": [ + "DefaultCrNodeVersionMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ - "Providerpython37frameworkonEventServiceRoleDefaultPolicyA9099DC2", - "Providerpython37frameworkonEventServiceRole9EA6B2B0" + "Providerpython39frameworkonEventServiceRoleDefaultPolicy16A4767C", + "Providerpython39frameworkonEventServiceRoleA299F5C1" ] }, - "CustomResourcepython37": { + "CustomResourcepython39": { "Type": "AWS::CloudFormation::CustomResource", "Properties": { "ServiceToken": { "Fn::GetAtt": [ - "Providerpython37frameworkonEvent3AA4F69E", + "Providerpython39frameworkonEvent00AFA742", "Arn" ] } @@ -194,7 +202,7 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "Lambdapython39ServiceRoleE2CFED77": { + "Lambdapython310ServiceRoleD185E0B6": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -225,7 +233,7 @@ ] } }, - "Lambdapython39426A0480": { + "Lambdapython310815BD7E9": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { @@ -236,7 +244,7 @@ }, "Role": { "Fn::GetAtt": [ - "Lambdapython39ServiceRoleE2CFED77", + "Lambdapython310ServiceRoleD185E0B6", "Arn" ] }, @@ -247,14 +255,14 @@ } ], "MemorySize": 512, - "Runtime": "python3.9", + "Runtime": "python3.10", "Timeout": 30 }, "DependsOn": [ - "Lambdapython39ServiceRoleE2CFED77" + "Lambdapython310ServiceRoleD185E0B6" ] }, - "Providerpython39frameworkonEventServiceRoleA299F5C1": { + "Providerpython310frameworkonEventServiceRoleB6DF2879": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -285,7 +293,7 @@ ] } }, - "Providerpython39frameworkonEventServiceRoleDefaultPolicy16A4767C": { + "Providerpython310frameworkonEventServiceRoleDefaultPolicyC0E8697B": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -296,7 +304,7 @@ "Resource": [ { "Fn::GetAtt": [ - "Lambdapython39426A0480", + "Lambdapython310815BD7E9", "Arn" ] }, @@ -306,7 +314,7 @@ [ { "Fn::GetAtt": [ - "Lambdapython39426A0480", + "Lambdapython310815BD7E9", "Arn" ] }, @@ -319,61 +327,550 @@ ], "Version": "2012-10-17" }, - "PolicyName": "Providerpython39frameworkonEventServiceRoleDefaultPolicy16A4767C", + "PolicyName": "Providerpython310frameworkonEventServiceRoleDefaultPolicyC0E8697B", "Roles": [ { - "Ref": "Providerpython39frameworkonEventServiceRoleA299F5C1" + "Ref": "Providerpython310frameworkonEventServiceRoleB6DF2879" } ] } }, - "Providerpython39frameworkonEvent00AFA742": { + "Providerpython310frameworkonEvent7294D715": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eaeb69bc290b516fe3b049f89d6118b22249df682fbabf56af300cf345198574.zip" + "S3Key": "8e3d635893ea17fa3158623489cd42c680fad925b38de1ef51cb10d84f6e245e.zip" }, "Role": { "Fn::GetAtt": [ - "Providerpython39frameworkonEventServiceRoleA299F5C1", + "Providerpython310frameworkonEventServiceRoleB6DF2879", "Arn" ] }, - "Description": "AWS CDK resource provider framework - onEvent (lambda-layer-kubectl-integ-stack/Providerpython3.9)", + "Description": "AWS CDK resource provider framework - onEvent (lambda-layer-kubectl-integ-stack/Providerpython3.10)", "Environment": { "Variables": { "USER_ON_EVENT_FUNCTION_ARN": { "Fn::GetAtt": [ - "Lambdapython39426A0480", + "Lambdapython310815BD7E9", "Arn" ] } } }, "Handler": "framework.onEvent", - "Runtime": "nodejs14.x", + "Runtime": { + "Fn::FindInMap": [ + "DefaultCrNodeVersionMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ - "Providerpython39frameworkonEventServiceRoleDefaultPolicy16A4767C", - "Providerpython39frameworkonEventServiceRoleA299F5C1" + "Providerpython310frameworkonEventServiceRoleDefaultPolicyC0E8697B", + "Providerpython310frameworkonEventServiceRoleB6DF2879" ] }, - "CustomResourcepython39": { + "CustomResourcepython310": { "Type": "AWS::CloudFormation::CustomResource", "Properties": { "ServiceToken": { "Fn::GetAtt": [ - "Providerpython39frameworkonEvent00AFA742", + "Providerpython310frameworkonEvent7294D715", "Arn" ] } }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" + }, + "Lambdapython311ServiceRoleB063EF97": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "Lambdapython311020B8AC7": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "134b81dc12f7bd57e63ba8a0ab049586c8a5e07e7afce1e400dc6e1319e9abfb.zip" + }, + "Role": { + "Fn::GetAtt": [ + "Lambdapython311ServiceRoleB063EF97", + "Arn" + ] + }, + "Handler": "index.handler", + "Layers": [ + { + "Ref": "KubectlLayer600207B5" + } + ], + "MemorySize": 512, + "Runtime": "python3.11", + "Timeout": 30 + }, + "DependsOn": [ + "Lambdapython311ServiceRoleB063EF97" + ] + }, + "Providerpython311frameworkonEventServiceRoleAEC610C5": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "Providerpython311frameworkonEventServiceRoleDefaultPolicyF13D93DB": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "Lambdapython311020B8AC7", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Lambdapython311020B8AC7", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Providerpython311frameworkonEventServiceRoleDefaultPolicyF13D93DB", + "Roles": [ + { + "Ref": "Providerpython311frameworkonEventServiceRoleAEC610C5" + } + ] + } + }, + "Providerpython311frameworkonEvent29915103": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "8e3d635893ea17fa3158623489cd42c680fad925b38de1ef51cb10d84f6e245e.zip" + }, + "Role": { + "Fn::GetAtt": [ + "Providerpython311frameworkonEventServiceRoleAEC610C5", + "Arn" + ] + }, + "Description": "AWS CDK resource provider framework - onEvent (lambda-layer-kubectl-integ-stack/Providerpython3.11)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "Lambdapython311020B8AC7", + "Arn" + ] + } + } + }, + "Handler": "framework.onEvent", + "Runtime": { + "Fn::FindInMap": [ + "DefaultCrNodeVersionMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, + "Timeout": 900 + }, + "DependsOn": [ + "Providerpython311frameworkonEventServiceRoleDefaultPolicyF13D93DB", + "Providerpython311frameworkonEventServiceRoleAEC610C5" + ] + }, + "CustomResourcepython311": { + "Type": "AWS::CloudFormation::CustomResource", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "Providerpython311frameworkonEvent29915103", + "Arn" + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "Lambdapython312ServiceRoleAEE8F417": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "Lambdapython312DDA13323": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "134b81dc12f7bd57e63ba8a0ab049586c8a5e07e7afce1e400dc6e1319e9abfb.zip" + }, + "Role": { + "Fn::GetAtt": [ + "Lambdapython312ServiceRoleAEE8F417", + "Arn" + ] + }, + "Handler": "index.handler", + "Layers": [ + { + "Ref": "KubectlLayer600207B5" + } + ], + "MemorySize": 512, + "Runtime": "python3.12", + "Timeout": 30 + }, + "DependsOn": [ + "Lambdapython312ServiceRoleAEE8F417" + ] + }, + "Providerpython312frameworkonEventServiceRoleA5AFFB7F": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "Providerpython312frameworkonEventServiceRoleDefaultPolicy8FBA03B4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "Lambdapython312DDA13323", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Lambdapython312DDA13323", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Providerpython312frameworkonEventServiceRoleDefaultPolicy8FBA03B4", + "Roles": [ + { + "Ref": "Providerpython312frameworkonEventServiceRoleA5AFFB7F" + } + ] + } + }, + "Providerpython312frameworkonEvent9712A9EB": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "8e3d635893ea17fa3158623489cd42c680fad925b38de1ef51cb10d84f6e245e.zip" + }, + "Role": { + "Fn::GetAtt": [ + "Providerpython312frameworkonEventServiceRoleA5AFFB7F", + "Arn" + ] + }, + "Description": "AWS CDK resource provider framework - onEvent (lambda-layer-kubectl-integ-stack/Providerpython3.12)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "Lambdapython312DDA13323", + "Arn" + ] + } + } + }, + "Handler": "framework.onEvent", + "Runtime": { + "Fn::FindInMap": [ + "DefaultCrNodeVersionMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, + "Timeout": 900 + }, + "DependsOn": [ + "Providerpython312frameworkonEventServiceRoleDefaultPolicy8FBA03B4", + "Providerpython312frameworkonEventServiceRoleA5AFFB7F" + ] + }, + "CustomResourcepython312": { + "Type": "AWS::CloudFormation::CustomResource", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "Providerpython312frameworkonEvent9712A9EB", + "Arn" + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Mappings": { + "DefaultCrNodeVersionMap": { + "af-south-1": { + "value": "nodejs16.x" + }, + "ap-east-1": { + "value": "nodejs16.x" + }, + "ap-northeast-1": { + "value": "nodejs16.x" + }, + "ap-northeast-2": { + "value": "nodejs16.x" + }, + "ap-northeast-3": { + "value": "nodejs16.x" + }, + "ap-south-1": { + "value": "nodejs16.x" + }, + "ap-south-2": { + "value": "nodejs16.x" + }, + "ap-southeast-1": { + "value": "nodejs16.x" + }, + "ap-southeast-2": { + "value": "nodejs16.x" + }, + "ap-southeast-3": { + "value": "nodejs16.x" + }, + "ca-central-1": { + "value": "nodejs16.x" + }, + "cn-north-1": { + "value": "nodejs16.x" + }, + "cn-northwest-1": { + "value": "nodejs16.x" + }, + "eu-central-1": { + "value": "nodejs16.x" + }, + "eu-central-2": { + "value": "nodejs16.x" + }, + "eu-north-1": { + "value": "nodejs16.x" + }, + "eu-south-1": { + "value": "nodejs16.x" + }, + "eu-south-2": { + "value": "nodejs16.x" + }, + "eu-west-1": { + "value": "nodejs16.x" + }, + "eu-west-2": { + "value": "nodejs16.x" + }, + "eu-west-3": { + "value": "nodejs16.x" + }, + "me-central-1": { + "value": "nodejs16.x" + }, + "me-south-1": { + "value": "nodejs16.x" + }, + "sa-east-1": { + "value": "nodejs16.x" + }, + "us-east-1": { + "value": "nodejs16.x" + }, + "us-east-2": { + "value": "nodejs16.x" + }, + "us-gov-east-1": { + "value": "nodejs16.x" + }, + "us-gov-west-1": { + "value": "nodejs16.x" + }, + "us-iso-east-1": { + "value": "nodejs14.x" + }, + "us-iso-west-1": { + "value": "nodejs14.x" + }, + "us-isob-east-1": { + "value": "nodejs14.x" + }, + "us-west-1": { + "value": "nodejs16.x" + }, + "us-west-2": { + "value": "nodejs16.x" + } } }, "Parameters": { diff --git a/test/kubectl-layer.integ.ts b/test/kubectl-layer.integ.ts index 5076b794..3ea9fd82 100644 --- a/test/kubectl-layer.integ.ts +++ b/test/kubectl-layer.integ.ts @@ -2,20 +2,20 @@ import * as path from 'path'; 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 { KubectlV29Layer } from '../lib'; +import { KubectlV30Layer } from '../lib'; /** * Test verifies that kubectl and helm are invoked successfully inside Lambda runtime. */ - const app = new cdk.App(); const stack = new cdk.Stack(app, 'lambda-layer-kubectl-integ-stack'); -const layer = new KubectlV29Layer(stack, 'KubectlLayer'); +const layer = new KubectlV30Layer(stack, 'KubectlLayer'); const runtimes = [ - lambda.Runtime.PYTHON_3_7, lambda.Runtime.PYTHON_3_9, + new lambda.Runtime('python3.10', lambda.RuntimeFamily.PYTHON), + new lambda.Runtime('python3.11', lambda.RuntimeFamily.PYTHON), + new lambda.Runtime('python3.12', lambda.RuntimeFamily.PYTHON), ]; for (const runtime of runtimes) { @@ -33,6 +33,7 @@ for (const runtime of runtimes) { new cdk.CustomResource(stack, `CustomResource${runtime.name}`, { serviceToken: provider.serviceToken, }); + } app.synth(); diff --git a/test/kubectl-layer.test.ts b/test/kubectl-layer.test.ts index 01e4b15e..1b361ab2 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 { KubectlV29Layer } from '../lib'; +import { KubectlV30Layer } from '../lib'; test('synthesized to a layer version', () => { // GIVEN const stack = new Stack(); // WHEN - new KubectlV29Layer(stack, 'MyLayer'); + new KubectlV30Layer(stack, 'MyLayer'); // THEN Template.fromStack(stack).hasResourceProperties('AWS::Lambda::LayerVersion', { - Description: '/opt/kubectl/kubectl 1.29; /opt/helm/helm 3.14', + Description: '/opt/kubectl/kubectl 1.30; /opt/helm/helm 3.15', }); }); diff --git a/yarn.lock b/yarn.lock index a3c26921..093f6b94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,6 +10,21 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" +"@aws-cdk/asset-awscli-v1@^2.2.177": + version "2.2.202" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.202.tgz#4627201d71f6a5c60db36385ce09cb81005f4b32" + integrity sha512-JqlF0D4+EVugnG5dAsNZMqhu3HW7ehOXm5SDMxMbXNDMdsF0pxtQKNHRl52z1U9igsHmaFpUgSGjbhAJ+0JONg== + +"@aws-cdk/asset-kubectl-v20@^2.1.1": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.2.tgz#d8e20b5f5dc20128ea2000dc479ca3c7ddc27248" + integrity sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg== + +"@aws-cdk/asset-node-proxy-agent-v5@^2.0.148": + version "2.0.166" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.166.tgz#467507db141cd829ff8aa9d6ea5519310a4276b8" + integrity sha512-j0xnccpUQHXJKPgCwQcGGNu4lRiC1PptYfdxBIH1L4dRK91iBxtSQHESRQX+yB47oGLaF/WfNN/aF3WXwlhikg== + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.24.6": version "7.24.6" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.6.tgz#ab88da19344445c3d8889af2216606d3329f3ef2" @@ -995,6 +1010,16 @@ ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.1: + version "8.16.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.16.0.tgz#22e2a92b94f005f7e0f9c9d39652ef0b8f6f0cb4" + integrity sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw== + dependencies: + fast-deep-equal "^3.1.3" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.4.1" + ajv@^8.13.0: version "8.15.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.15.0.tgz#d918c661e3e820bbbc65a320e182ee56a1aa978a" @@ -1147,16 +1172,16 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" @@ -1164,19 +1189,23 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" -aws-cdk-lib@2.28.0: - version "2.28.0" - resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.28.0.tgz#bf01b0233d41ba7c211c4a039258850c42459604" - integrity sha512-ZAhIQ+mX2JYx8st6enan8qBzts7o+PXFJxLABIUYZSSus/ScWx9POLIVsV28LXorM4Y2su23VfWM7iVmCNxYAQ== +aws-cdk-lib@2.85.0: + version "2.85.0" + resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.85.0.tgz#09a577799b63107d3128c2755ee02acedc580e5d" + integrity sha512-u+ypK8XEMRH3tGRMSmcbPYxLet7xBdGIztUkMcPtlNJGhS/vxqh12yYkem3g3zzmHwdX8OPLSnlZ2sIuiIqp/g== dependencies: + "@aws-cdk/asset-awscli-v1" "^2.2.177" + "@aws-cdk/asset-kubectl-v20" "^2.1.1" + "@aws-cdk/asset-node-proxy-agent-v5" "^2.0.148" "@balena/dockerignore" "^1.0.2" case "1.6.3" - fs-extra "^9.1.0" - ignore "^5.2.0" + fs-extra "^11.1.1" + ignore "^5.2.4" jsonschema "^1.4.1" minimatch "^3.1.2" - punycode "^2.1.1" - semver "^7.3.7" + punycode "^2.3.0" + semver "^7.5.1" + table "^6.8.1" yaml "1.10.2" aws-cdk@^2: @@ -2399,6 +2428,15 @@ fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^11.1.1: + version "11.2.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -2408,16 +2446,6 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3786,6 +3814,11 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + lodash@^4.17.15, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -4313,7 +4346,7 @@ psl@^1.1.33: resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== -punycode@^2.1.0, punycode@^2.1.1: +punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== @@ -4559,7 +4592,7 @@ semver-intersect@^1.5.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@7.x, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.7, semver@^7.5.0, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2: +semver@7.x, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.5.0, semver@^7.5.1, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -4645,6 +4678,15 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + sort-json@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/sort-json/-/sort-json-2.0.1.tgz#7338783bef807185dc37d5b02e3afd905d537cfb" @@ -4915,6 +4957,17 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +table@^6.8.1: + version "6.8.2" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" + integrity sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + tapable@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -5205,7 +5258,7 @@ update-browserslist-db@^1.0.13: escalade "^3.1.2" picocolors "^1.0.1" -uri-js@^4.2.2: +uri-js@^4.2.2, uri-js@^4.4.1: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==