Want to exclude a kubectl job from helm installation

11/15/2019

want to exclude a kubectl job from helm installation and helm upgrade. Checked helm hook but didn't find any suitable tag for that. Can I create a custom tag for helm hook. Is there any way where I can run my job with helm command apart from install or upgrade.

-- Tanvi Pagare
hook
kubectl
kubernetes-helm

1 Answer

11/18/2019

You can pass a variable while running your install/upgrade helm.

By doing it you can use this variable and create a condition inside your hook before running it.

To pass this variable you need to use the option --set while running helm command.

helm upgrade . --set initSetup=false

This variable can be tested inside your hook as it's made on common helm charts as on this one.

-- mWatney
Source: StackOverflow