Skip to content

Commit ee63467

Browse files
authored
fix(eks): cluster.addHelmChart ignores skipCrds (#31832)
### Issue # (if applicable) Closes #31831. ### Reason for this change The `kubectl` custom resource lambda was not correctly passing the `skipCrds` parameter of `aws_eks.Cluster.addHelmChart` all the way through to the invocation of `helm`. As such, unexpected behaviour was observed where, even if `skipCrds` was `true`, `helm` running within the lambda would still attempt to install any relevant CRDs as part of the chart. ### Description of changes Adds the `skip_crds` argument to the call to `helm` within the `helm_handler` function. ### Description of how you validated changes I've run the unit tests and verified no changes. I cannot run the integration tests as I cannot afford the cost of deploying a full EKS cluster into my personal AWS account and I can't link this PR to our org's GitHub as per your guidelines, so I can't deploy into an account our org owns through CI. ### Checklist - [x] 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) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 8a0a538 commit ee63467

File tree

14 files changed

+14
-14
lines changed

14 files changed

+14
-14
lines changed
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-eks/test/integ.eks-helm-asset.js.snapshot/aws-cdk-eks-helm-test.assets.json

+7-7
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-eks/test/integ.eks-helm-asset.js.snapshot/aws-cdk-eks-helm-test.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@
13461346
{
13471347
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
13481348
},
1349-
"/34c4071c4ef1788c4cb0f9a1b7ec53338fb326bb2b24156cc7b95b3e97d17d0d.json"
1349+
"/285073efff3c8021a1ececafc59702c37ccd5cdc1282f1cfdefe07aca8f379c8.json"
13501350
]
13511351
]
13521352
}

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-helm-asset.js.snapshot/awscdkekshelmtestawscdkawseksKubectlProvider207F42E4.nested.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"S3Bucket": {
88
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
99
},
10-
"S3Key": "fba306965da4b2680dd8b4e6916610efe237162f913f22b10146f647b3f6bce4.zip"
10+
"S3Key": "96b83d7c7535f7e731e0679249de9470f417342331b121e36664078b4ef4a11b.zip"
1111
},
1212
"Description": "onEvent handler for EKS kubectl resource provider",
1313
"Environment": {

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-helm-asset.js.snapshot/manifest.json

+1-1
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-eks/test/integ.eks-helm-asset.js.snapshot/tree.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/custom-resource-handlers/lib/aws-eks/kubectl-handler/helm/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def helm_handler(event, context):
9191
chart_dir = get_chart_from_oci(tmpdir.name, repository, version)
9292
chart = chart_dir
9393

94-
helm('upgrade', release, chart, repository, values_file, namespace, version, wait, timeout, create_namespace, atomic=atomic)
94+
helm('upgrade', release, chart, repository, values_file, namespace, version, wait, timeout, create_namespace, skip_crds, atomic=atomic)
9595
elif request_type == "Delete":
9696
try:
9797
helm('uninstall', release, namespace=namespace, wait=wait, timeout=timeout)

0 commit comments

Comments
 (0)