Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Add support for --atomic flag #136

Merged
merged 2 commits into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions assets/out
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down