Skip to content

Commit

Permalink
Merge pull request #33 from joosangkim/improve/add-atomic-option [sem…
Browse files Browse the repository at this point in the history
…ver:patch]

Improve suggestion - add atomic option for upgrading chart
  • Loading branch information
lokst authored Dec 11, 2020
2 parents 025f09d + bbc4b12 commit ffeeefc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/commands/upgrade-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ parameters:
The string is a decimal with unit suffix, such as “20m”, “1.25h”, “5s”
type: string
default: "30m"
atomic:
description: |
if set, upgrade process rolls back changes made in case of failed upgrade.
The --wait flag will be set automatically if --atomic is used
type: boolean
default: false
steps:
- install-helm-client:
version: << parameters.helm-version >>
Expand All @@ -148,6 +154,7 @@ steps:
name: Upgrade or install chart
command: |
TIMEOUT="<< parameters.timeout >>"
ATOMIC="<< parameters.atomic >>"
WAIT="<< parameters.wait >>"
NO_HOOKS="<< parameters.no-hooks >>"
RECREATE_PODS="<< parameters.recreate-pods >>"
Expand Down Expand Up @@ -178,6 +185,9 @@ steps:
if [ "${RECREATE_PODS}" == "true" ]; then
set -- "$@" --recreate-pods
fi
if [ "${ATOMIC}" == "true" ]; then
set -- "$@" --atomic
fi
if [ "${WAIT}" == "true" ]; then
set -- "$@" --wait
fi
Expand Down

0 comments on commit ffeeefc

Please sign in to comment.