From 20d6797d16645fdec94b330283860185d24d916e Mon Sep 17 00:00:00 2001 From: "guillaume.lambert" Date: Wed, 4 May 2022 09:44:44 +0200 Subject: [COMMON] Fix some k8s plug deploy.sh bashisms These bashisms were added recently with a few fixes. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert Change-Id: I33b77a1db871d6628187692e260265d9c754103f --- kubernetes/helm/plugins/deploy/deploy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh index 858a5e0b7d..a8d134ba92 100755 --- a/kubernetes/helm/plugins/deploy/deploy.sh +++ b/kubernetes/helm/plugins/deploy/deploy.sh @@ -93,8 +93,9 @@ resolve_deploy_flags() { check_for_dep() { try=0 retries=60 - until (kubectl get deployment -n $HELM_NAMESPACE | grep -P "\b$1\b") &>/dev/null; do - (( ++try > retries )) && exit 1 + until (kubectl get deployment -n $HELM_NAMESPACE | grep -P "\b$1\b") >/dev/null 2>&1; do + try=$(($try + 1)) + [ $try -gt $retries ] && exit 1 echo "$1 not found. Retry $try/$retries" sleep 10 done -- cgit 1.2.3-korg