Skip to content

Commit 9961257

Browse files
authored
fix(eks): Helm charts fail to install when provided as an asset (#19180)
When the helm chart is specified by an asset instead of a respository URL, the `repository` variable in the custom resource is `None`. Adding a check before using the variable. This bug wasn't caught by integration tests because the existing integration test that exercises EKS clusters creates a cluster with many features, including two different helm charts: one from a URL and another one from an asset. This change includes a new integration test that exclusively deploys a cluster with a helm chart from an asset. Fixes #19179. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 3af329b commit 9961257

File tree

3 files changed

+1487
-2
lines changed

3 files changed

+1487
-2
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ def helm_handler(event, context):
8080
# future work: support versions from s3 assets
8181
chart = get_chart_asset_from_url(chart_asset_url)
8282

83-
if repository.startswith('oci://'):
84-
assert(repository is not None)
83+
if repository is not None and repository.startswith('oci://'):
8584
tmpdir = tempfile.TemporaryDirectory()
8685
chart_dir = get_chart_from_oci(tmpdir.name, release, repository, version)
8786
chart = chart_dir

0 commit comments

Comments
 (0)