Skip to content

Commit

Permalink
add lambda layer for kubectl for EKS 1.30 and 1.31
Browse files Browse the repository at this point in the history
  • Loading branch information
roystchiang committed Jan 14, 2025
1 parent ff66b7b commit 9197830
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cdk_infra/lib/utils/eks/kubectlLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { KubectlV24Layer } from '@aws-cdk/lambda-layer-kubectl-v24';
import { KubectlV25Layer } from '@aws-cdk/lambda-layer-kubectl-v25';
import { KubectlV26Layer } from '@aws-cdk/lambda-layer-kubectl-v26';
import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27';
import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30';
import { KubectlV31Layer } from '@aws-cdk/lambda-layer-kubectl-v31';

export function GetLayer(
scope: Construct,
Expand All @@ -19,6 +21,10 @@ export function GetLayer(
return new KubectlV26Layer(scope, 'v26Layer');
case '1.27':
return new KubectlV27Layer(scope, 'v27Layer');
case '1.30':
return new KubectlV30Layer(scope, 'v30Layer');
case '1.31':
return new KubectlV31Layer(scope, 'v31Layer');
default:
throw new Error(`invalid kubernetes version: ${k8sVersion.version}`);
}
Expand Down
32 changes: 32 additions & 0 deletions cdk_infra/package-lock.json

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

2 changes: 2 additions & 0 deletions cdk_infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"@aws-cdk/lambda-layer-kubectl-v25": "^2.0.4",
"@aws-cdk/lambda-layer-kubectl-v26": "^2.1.0",
"@aws-cdk/lambda-layer-kubectl-v27": "^2.1.0",
"@aws-cdk/lambda-layer-kubectl-v30": "^2.0.0",
"@aws-cdk/lambda-layer-kubectl-v31": "^2.0.0",
"aws-cdk-lib": "^2.173.4",
"constructs": "^10.4.2",
"js-yaml": "^4.1.0",
Expand Down

0 comments on commit 9197830

Please sign in to comment.