diff options
Diffstat (limited to 'kubernetes/helm')
-rwxr-xr-x | kubernetes/helm/plugins/deploy/deploy.sh | 16 | ||||
-rwxr-xr-x | kubernetes/helm/plugins/undeploy/undeploy.sh | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh index ce8e80225f..2182dde1d6 100755 --- a/kubernetes/helm/plugins/deploy/deploy.sh +++ b/kubernetes/helm/plugins/deploy/deploy.sh @@ -89,16 +89,16 @@ resolve_deploy_flags() { deploy() { # validate params - if [ -z "$1" ] || [ -z "$2" ]; then + if [ -z "$1" ] || [ -z "$2" ]; then usage - exit 0 + exit 1 fi RELEASE=$1 CHART_URL=$2 - FLAGS=${@:3} - CHART_REPO="$(echo "$CHART_URL" |cut -d'/' -f1)" - CHART_NAME="$(echo "$CHART_URL" |cut -d'/' -f2)" + FLAGS=$(echo ${@} | sed 's/^ *[^ ]* *[^ ]* *//') + CHART_REPO="$(echo "$CHART_URL" | cut -d'/' -f1)" + CHART_NAME="$(echo "$CHART_URL" | cut -d'/' -f2)" if expr "$HELM_VER" : "v3\..*" ; then CACHE_DIR=~/.local/share/helm/plugins/deploy/cache else @@ -123,7 +123,7 @@ deploy() { fi # determine if set-last-applied flag is enabled SET_LAST_APPLIED="false" - if expr"$FLAGS" : ".*--set-last-applied.*" ; then + if expr "$FLAGS" : ".*--set-last-applied.*" ; then FLAGS="$(echo $FLAGS| sed -n 's/--set-last-applied//p')" SET_LAST_APPLIED="true" fi @@ -251,7 +251,7 @@ deploy() { fi if [ "$DELAY" = "true" ]; then echo sleep 3m - sleep 3m + sleep 180 fi else array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}")) @@ -287,7 +287,7 @@ case "${1:-"help"}" in usage ;; *) - deploy $1 $2 ${@:3} + deploy $1 $2 $(echo ${@} | sed 's/^ *[^ ]* *[^ ]* *//') ;; esac diff --git a/kubernetes/helm/plugins/undeploy/undeploy.sh b/kubernetes/helm/plugins/undeploy/undeploy.sh index 790f84fda9..a3b0e3c623 100755 --- a/kubernetes/helm/plugins/undeploy/undeploy.sh +++ b/kubernetes/helm/plugins/undeploy/undeploy.sh @@ -29,9 +29,9 @@ undeploy() { done } -if [ $# < 1 ]; then +if [ -z "$1" ]; then echo "Error: command 'undeploy' requires a release name" - exit 0 + exit 1 fi case "${1:-"help"}" in @@ -45,8 +45,8 @@ case "${1:-"help"}" in usage ;; *) - undeploy $1 ${@:2} + undeploy $1 $(echo ${@} | sed 's/^ *[^ ]* *//') ;; esac -exit 0
\ No newline at end of file +exit 0 |