Installing/Upgrading
2color opened this issue · 1 comments
Hey,
I came across this tip:
In order to use the same command when installing and upgrading a release, use the following command:
helm upgrade --install <release name> --values <values file> <chart directory>
@msiegenthaler Was there a reason you didn't use this to avoid checking for upgrade/install?
P.S.
Thanks again for creating this resourceful! It's exceedingly useful
Actually that's a very good question. I do use the upgrade --install
when I use helm on the commandline.
The differences are:
- Only on install:
if [ -n "$release" ]; then
helm_cmd="$helm_cmd -n $release"
helm_echo="$helm_echo -n $release"
fi
if [ "$replace" = true ]; then
helm_cmd="$helm_cmd --replace"
helm_echo="$helm_echo --replace"
fi
# Find the name of the release
release=`cat $logfile | grep "NAME:" | awk '{print $2}'`
- only in upgrade
if [ "$recreate_pods" = true ]; then
helm_cmd="$helm_cmd --recreate-pods"
helm_echo="$helm_echo --recreate-pods"
fi
Recreate pods and replace are not really relevent, but having an optional release is.
So the reason I did it that way is to support installing releases without having to specify a name. Is that a valid use case for anyone? I'm not currently seeing a scenario where I'd leave out the release.