Skip to content

Commit

Permalink
Merge pull request #20 from galal-hussein/skip_bootstrap
Browse files Browse the repository at this point in the history
Skip helm v2 init if bootstrap env is passed
  • Loading branch information
galal-hussein authored Nov 10, 2020
2 parents 7d7f076 + 0c95087 commit c8a5803
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions entry
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,19 @@ set +v -x
cp /var/run/secrets/kubernetes.io/serviceaccount/ca.crt /usr/local/share/ca-certificates/
update-ca-certificates

tiller --listen=127.0.0.1:44134 --storage=secret &
export HELM_HOST=127.0.0.1:44134
if [ "$BOOTSTRAP" != "true" ]; then
tiller --listen=127.0.0.1:44134 --storage=secret &
export HELM_HOST=127.0.0.1:44134

helm_v2 init --skip-refresh --client-only
EXIST=$(helm_v2 ls --all "^$NAME\$" --output json | jq -r '.Releases | length')
fi

helm_v2 init --skip-refresh --client-only
EXIST=$(helm_v2 ls --all "^$NAME\$" --output json | jq -r '.Releases | length')
if [ "$EXIST" == "1" ] || [ "$HELM_VERSION" == "v2" ]; then
if [ "$BOOTSTRAP" == "true" ]; then
echo "Error: bootstrap flag can't be set with helm version 2 charts, please remove the bootstrap flag and update the chart"
exit 1
fi
HELM="helm_v2"
NAME_ARG="--name"
JQ_CMD='"\(.Releases[0].AppVersion),\(.Releases[0].Status)"'
Expand Down

0 comments on commit c8a5803

Please sign in to comment.