aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/helm
diff options
context:
space:
mode:
authorguillaume.lambert <guillaume.lambert@orange.com>2022-01-03 14:48:05 +0100
committerGuillaume Lambert <guillaume.lambert@orange.com>2022-05-15 11:17:13 +0000
commite9f5a90e0c7ce23061308e1a0614de2bc83a1aea (patch)
tree688e89ad368d908cdba229c094b20ef914354118 /kubernetes/helm
parentc1aa68b0c1183d90e6ada524d7e16dabf51bf890 (diff)
[COMMON] Fix more and more array bashisms step 2
pointed out by checkbashisms. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: I1712fd583a454cbd7599c53a8f0542c71a773ba5
Diffstat (limited to 'kubernetes/helm')
-rwxr-xr-xkubernetes/helm/plugins/deploy/deploy.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh
index a8d134ba92..347c7689e4 100755
--- a/kubernetes/helm/plugins/deploy/deploy.sh
+++ b/kubernetes/helm/plugins/deploy/deploy.sh
@@ -70,21 +70,21 @@ generate_overrides() {
resolve_deploy_flags() {
- flags=($1)
- n=${#flags[*]}
- i=0 ; while [ "$i" -lt "$n" ]; do
- PARAM=${flags[i]}
- if [ "$PARAM" = "-f" ] || \
- [ "$PARAM" = "--values" ] || \
- [ "$PARAM" = "--set" ] || \
- [ "$PARAM" = "--set-string" ] || \
- [ "$PARAM" = "--version" ]; then
- # skip param and its value
- i=$((i + 1))
+ skip="false"
+ for param in $1; do
+ if [ "$skip" = "false" ]; then
+ if [ "$param" = "-f" ] || \
+ [ "$param" = "--values" ] || \
+ [ "$param" = "--set" ] || \
+ [ "$param" = "--set-string" ] || \
+ [ "$param" = "--version" ]; then
+ skip="true"
+ else
+ DEPLOY_FLAGS="$DEPLOY_FLAGS $param"
+ fi
else
- DEPLOY_FLAGS="$DEPLOY_FLAGS $PARAM"
+ skip="false"
fi
- i=$((i+1))
done
echo "$DEPLOY_FLAGS"
}