Skip to content

Commit

Permalink
Merge branch 'main' into fix-ecs-service-hotswap-wait
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] committed Mar 26, 2024
2 parents b16e436 + e77ce26 commit 85517d3
Show file tree
Hide file tree
Showing 31 changed files with 7,433 additions and 17 deletions.
1 change: 1 addition & 0 deletions packages/@aws-cdk-testing/framework-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"dependencies": {
"@aws-cdk/integ-tests-alpha": "0.0.0",
"@aws-cdk/lambda-layer-kubectl-v24": "^2.0.242",
"@aws-cdk/lambda-layer-kubectl-v29": "^2.0.0",
"aws-cdk-lib": "0.0.0",
"aws-sdk": "^2.1583.0",
"aws-sdk-mock": "5.6.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import * as lambda from 'aws-cdk-lib/aws-lambda';
import { KubectlV24Layer } from '@aws-cdk/lambda-layer-kubectl-v24';
import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29';
import { Construct } from 'constructs';
import * as eks from 'aws-cdk-lib/aws-eks';

export function getClusterVersionConfig(scope: Construct) {
const versionMap: { [key: string]: any } = {
1.24: KubectlV24Layer,
1.29: KubectlV29Layer,
};

export function getClusterVersionConfig(scope: Construct, version?: eks.KubernetesVersion) {
const _version = version ?? eks.KubernetesVersion.V1_24;
return {
version: eks.KubernetesVersion.V1_24,
version: _version,
// Crazy type-casting is required because KubectlLayer peer depends on
// types from aws-cdk-lib, but we run integration tests in the @aws-cdk/
// v1-style directory, not in the aws-cdk-lib v2-style directory.
kubectlLayer: new KubectlV24Layer(scope, 'KubectlLayer') as unknown as lambda.ILayerVersion,
// kubectlLayer: new KubectlV24Layer(scope, 'KubectlLayer') as unknown as lambda.ILayerVersion,
kubectlLayer: new versionMap[_version.version](scope, 'KubectlLayer') as unknown as lambda.ILayerVersion,
};
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 85517d3

Please sign in to comment.