Skip to content

Commit

Permalink
fix(eks): helm uninstall in custom resource handler does not respect …
Browse files Browse the repository at this point in the history
…`Wait` (#28830)

I have a stack that installs and uninstalls helm charts, where the underlying resources use [Kubernetes Finalizers](https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/). CDK's helm construct currently ignores `--wait`, which means that any object finalization in those helm charts is not respected in my dependency ordering.

## Compatibility

I could see some debate around whether or not this is a breaking change. I'm currently viewing it as a bug fix. I'm a bit cautious about how valuable it would be to gate this behavior compared to the additional complexity.

## Testing

Tested on a local fork and it worked like a charm

Closes #28831

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
ellistarn authored Jan 25, 2024
1 parent 95d187e commit 7a30f5d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def helm_handler(event, context):
helm('upgrade', release, chart, repository, values_file, namespace, version, wait, timeout, create_namespace)
elif request_type == "Delete":
try:
helm('uninstall', release, namespace=namespace, timeout=timeout)
helm('uninstall', release, namespace=namespace, wait=wait, timeout=timeout)
except Exception as e:
logger.info("delete error: %s" % e)

Expand Down

0 comments on commit 7a30f5d

Please sign in to comment.