diff --git a/assets/deployer b/assets/deployer index af153a2cd707076128882fff938fe48fb404c6ac..2e4da5bae8f587593a4e1a469098ed41d66cb35a 100755 --- a/assets/deployer +++ b/assets/deployer @@ -220,7 +220,6 @@ prepare_helm() { prepare_helm_command() { echo -ne "Preparing helm command..." - cmd="helm --tiller-namespace=${namespace} --namespace=${namespace} --wait" if [ "${name}" == "" ];then echo "failed" @@ -234,18 +233,7 @@ prepare_helm_command() { return 1 fi - out=`helm list -a --tiller-namespace ${namespace} --namespace ${namespace}` - if [ "$?" != "0" ];then - echo "failed" - echo "$out" - return 1 - fi - - if [ "$(echo $out | grep ${name} | grep DEPLOYED)" == "" ];then - cmd="$cmd install -n ${name}" - else - cmd="$cmd upgrade ${name} --recreate-pods" - fi + cmd="helm upgrade --install --wait --tiller-namespace=${namespace} --namespace=${namespace}" for set in ${sets};do cmd="$cmd --set ${set}" @@ -264,14 +252,15 @@ helm_deploy() { echo -ne "Deploying ${name}..." local out="" - if [ "$(helm ls --tiller-namespace=${namespace} --namespace=${namespace} --deleted --failed --short | grep ${name})" != "" ];then - out=`helm delete --tiller-namespace=${namespace} --purge ${name} 2>&1` - if [ "$?" != "0" ];then - echo "failed" - echo "$out" - return 1 - fi - fi + # todo: do we need this when we do a "helm upgrade --install" ? + # if [ "$(helm ls --tiller-namespace=${namespace} --namespace=${namespace} --deleted --failed --short | grep ${name})" != "" ];then + # out=`helm delete --tiller-namespace=${namespace} --purge ${name} 2>&1` + # if [ "$?" != "0" ];then + # echo "failed" + # echo "$out" + # return 1 + # fi + # fi out=`$cmd 2>&1` if [ "$?" != "0" ];then