terratest
terratest copied to clipboard
add --install option to helm upgrade
Hi all,
In our usual CI/CD scripts, we often use helm upgrade --install
to avoid special conditions for the initial installation.
It would be great if we can have the same option for terratest.
I would be happy to create a PR for this, I am just wondering what would be the best approach to add this. Currently, I would have the following ideas:
- Option 1: add another parameter like
shouldInstall
to the Upgrade method: https://github.com/gruntwork-io/terratest/blob/master/modules/helm/upgrade.go#L14 - Option 2: simply always add the install flag, as the usage of
upgrade
suggests that something is already installed anyway
What are your thoughts here? Let me know if I should open a PR.
FYI: I am aware that I could do this today via RunHelmCommandAndGetOutputE
, however it would be nice to have it available in the mentioned wrapper functions.
Thanks a lot!
This makes sense to me. Always adding in the --install
flag seems reasonable, since for most test use cases that want to test upgrade paths, you would call Upgrade
twice anyway
Thanks a lot for the quick feedback, PR is here: #550