Skip to content

Commit

Permalink
Merge pull request #12 from galal-hussein/fix_upgrades
Browse files Browse the repository at this point in the history
Dont check for version when upgrading
  • Loading branch information
erikwilson authored Apr 8, 2020
2 parents b1573fe + 60be78d commit 171ae06
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions entry
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

helm_update() {
if [ "$HELM" == "helm_v3" ]; then
LINE="$($HELM ls --all -f "^$NAME\$" --output json | jq -r "$JQ_CMD" | tr '[:upper:]' '[:lower:]')"
LINE="$($HELM ls --all-namespaces --all -f "^$NAME\$" --output json | jq -r "$JQ_CMD" | tr '[:upper:]' '[:lower:]')"
else
LINE="$($HELM ls --all "^$NAME\$" --output json | jq -r "$JQ_CMD" | tr '[:upper:]' '[:lower:]')"
fi
Expand Down Expand Up @@ -30,13 +30,13 @@ helm_update() {
$HELM "$@" $NAME_ARG $NAME $CHART $VALUES
exit
fi
if [ -z "$VERSION" ] || [ "$INSTALLED_VERSION" = "$VERSION" ]; then
if [ "$STATUS" = "deployed" ]; then
echo Already installed $NAME, upgrading
shift 1
$HELM $@ upgrade $NAME $CHART $VALUES
exit
fi

# Upgrade only if the status is already deployed
if [ "$STATUS" = "deployed" ]; then
echo Already installed $NAME, upgrading
shift 1
$HELM upgrade $NAME $CHART $VALUES
exit
fi

if [ "$STATUS" = "failed" ] || [ "$STATUS" = "deleted" ]; then
Expand Down

0 comments on commit 171ae06

Please sign in to comment.