linkyard / concourse-helm-resource

Deploy to kubernetes helm from your concourse.ci.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why is `helm repo update` called many times?

arbourd opened this issue · comments

On line 145 helm repo update is called many times, once for each repo. Would it not make sense to call once, after the loop of adds? Anything I'm missing?

for r in $repos; do
name=$(echo $r | jq -r '.name')
url=$(echo $r | jq -r '.url')
username=$(echo $r | jq -r '.username // ""')
password=$(echo $r | jq -r '.password // ""')
echo Installing helm repository $name $url
if [[ -n "$username" && -n "$password" ]]; then
helm repo add $name $url --tiller-namespace $tiller_namespace --username $username --password $password
else
helm repo add $name $url --tiller-namespace $tiller_namespace
fi
helm repo update
done

Yeah, makes sense, no point in calling it many times.