From 9ff0b468ca48547daa05806c266efb408ce92ca6 Mon Sep 17 00:00:00 2001 From: Kevin Snyder Date: Mon, 6 Jan 2020 13:09:01 -0800 Subject: [PATCH 1/2] Add support for --atomic flag --- assets/out | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/out b/assets/out index d7d283c..1cf4160 100755 --- a/assets/out +++ b/assets/out @@ -34,6 +34,7 @@ delete=$(jq -r '.params.delete // "false"' < $payload) test=$(jq -r '.params.test // "false"' < $payload) purge=$(jq -r '.params.purge // "false"' < $payload) devel=$(jq -r '.params.devel // "false"' < $payload) +atomic=$(jq -r '.params.atomic // "false"' < $payload) recreate_pods=$(jq -r '.params.recreate_pods // "false"' < $payload) force=$(jq -r '.params.force // "false"' < $payload) show_diff=$(jq -r '.params.show_diff // "false"' < $payload) @@ -161,6 +162,9 @@ helm_upgrade() { fi upgrade_args+=("--version" "$version") fi + if [ "$atomic" = true ]; then + non_diff_args+=("--atomic") + fi if [ "$recreate_pods" = true ]; then non_diff_args+=("--recreate-pods") fi From 5073d667cc2d234187e87e8958acd90cdc2a7a3e Mon Sep 17 00:00:00 2001 From: Kevin Snyder Date: Mon, 6 Jan 2020 14:32:52 -0800 Subject: [PATCH 2/2] Add atomic option to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e99e0ed..32fd984 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ on the cluster. * `wait_until_ready`: *Optional.* Set to the number of seconds it should wait until all the resources in the chart are ready. (Default: `0` which means don't wait). * `check_is_ready`: *Optional.* Requires that `wait_until_ready` is set to Default. Applies --wait without timeout. (Default: false) +* `atomic`: *Optional.* This flag will cause failed installs to purge the release, and failed upgrades to rollback to the previous release. (Default: false) * `recreate_pods`: *Optional.* This flag will cause all pods to be recreated when upgrading. (Default: false) * `show_diff`: *Optional.* Show the diff that is applied if upgrading an existing successful release. Will not be used when `devel` is set. (Default: false) * `exit_after_diff`: *Optional.* Show the diff but don't actually install/upgrade. (Default: false)