Skip to content

aws-eks: support --atomic flag for helm commands #22254

@michaelfedell

Description

@michaelfedell

Describe the feature

Support the Helm CLI --atomic flag as a prop to the aws-cdk.aws-eks.HelmChart construct. This would enable a user to perform their install/upgrade as an atomic operation, rolling back or uninstalling if the operation fails.

Use Case

Currently, if the resources installed by helm do not successfully initialize and the --wait flag is true, then helm will fail to send a response back to the custom resource in time. Once the first invocation fails, subsequent attempts will fail with the following error:

Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress

After the max attempts, the CloudFormation stack will be marked as UPDATE_ROLLBACK_FAILED. Forcing the user to manually rollback the helm release as described in this issue on the helm repo

Proposed Solution

This could be supported with an additional, optional ResourceProperty passed to the custom resource handler and used in the constructed helm command.

def helm(verb, release, chart = None, repo = None, file = None, namespace = None, version = None, wait = False, timeout = None, create_namespace = None):

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.28.1

Environment details (OS name and version, etc.)

MacOS, TypeScript

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes Serviceeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdp2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions