Skip to content

Commit b11f663

Browse files
authored
feat(eks): make kubectlLayer property required from optional (#32930)
### Issue #33261 ### Reason for this change `aws-cdk-lib` has a very outdated version of kubectl layer as dependency https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/package.json#L123. It uses an outdated helm version which is involved in a CVE. The dependency was added because if users do not provide a kubectl layer version for EKS cluster, it will use v20 as the default. CDK itself shouldn't use a specific version of kubectl layer as dependency. To remove the dependency, `kubectlLayer` will become a required property instead of optional. The default version v20 is too old to work with current EKS supported version v24+. However, if you're not using the property, you will see an error saying it's a required property. Please uses a kubectl layer version that's compatible with your cluster. ### Description of changes - Make the property required from options - Update unit tests and integration tests - Remove the dependency of `"@aws-cdk/asset-kubectl-v20": "^2.1.3"` ### Describe any new or updated permissions being added ### Description of how you validated changes unit tests/integration tests ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) BREAKING CHANGE: `kubectlLayer` property is now required in EKS `Cluster` and `FargateCluster` constructs. The default value for `kubectlLayer` is outdated and hence being removed. You can specify your own kubectlLayer version based on your Kubernetes version. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent b481b1c commit b11f663

File tree

95 files changed

+1467
-10880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1467
-10880
lines changed

allowed-breaking-changes.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,3 +951,8 @@ changed-type:aws-cdk-lib.cx_api.CloudFormationStackArtifact.notificationArns
951951
# See: https://github.com/cdklabs/cloud-assembly-schema/pull/121
952952
weakened:aws-cdk-lib.cloud_assembly_schema.MetadataEntry
953953
weakened:aws-cdk-lib.cx_api.MetadataEntryResult
954+
955+
# Making kubectlLayer prop required from optional so we can remove the outdated kubectl layer dependency
956+
strengthened:aws-cdk-lib.aws_eks.ClusterProps
957+
strengthened:aws-cdk-lib.aws_eks.FargateClusterProps
958+
removed:aws-cdk-lib.lambda_layer_kubectl.KubectlLayer
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.818f9976c0b6e85dd2696d24402c2a177fb2c520d779e1925160a62523c4f20a/index.js

Lines changed: 0 additions & 57 deletions
This file was deleted.
1.57 MB
Binary file not shown.

packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.aea9e78c19375cc11788e490fdd0d8d90a99fc5509f3ade872bff74980f89265/index.js

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)