Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Add Helm force upgrade option #1760

Merged
merged 2 commits into from
Feb 25, 2019
Merged

Add Helm force upgrade option #1760

merged 2 commits into from
Feb 25, 2019

Conversation

stefanprodan
Copy link
Member

When upgrading a release that's not backwards compatible (changes in volumes, selectors, etc) Tiller will mark the release as failed and helm-op users have to delete the HR with kubectl or force the upgrade using Helm CLI. This PR adds forceUpgrade option to the HR CRD to avoid manually interventions on the cluster.

@squaremo
Copy link
Member

This seems like it would be a property of a particular upgrade (e.g., from whatever chart, version 2.1 to 2.2), and not of the release in general. So the mode of use would be something like

  • find out (perhaps through it failing) that the upgrade won't work
  • put the extra field in the HelmRelease manifest, along with the new chart version
  • let it be rolled forward
  • remove the field from the HelmRelease manifest, so it doesn't keep using --force

I guess this would work, but it is pretty awkward. I admit I do not have a counter-proposal, mind you.

@hiddeco
Copy link
Member

hiddeco commented Feb 25, 2019

I guess this would work, but it is pretty awkward.

Users will only need it in particular scenarios, mostly due to faulty chart releases that do not maintain (correct) compatibility (one that comes to mind is the stable/nginx-ingress chart that had a backwards and forwards incompatible breaking change).

For this particular scenario it is the only tool that is missing right now to make the operation possible with the Helm operator. If it ends up to be too awkward for our user base I expect that we get feedback fast enough to iterate over the solution.

@squaremo
Copy link
Member

squaremo commented Feb 25, 2019

If it ends up to be too awkward for our user base I expect that we get feedback fast enough to iterate over the solution.

OK. Bear in mind that adding things to the CRD is hard to back out of. Though, we have a few additions that alter the flags given to helm (e.g., resetValues), so we've already taken that road.

@hiddeco
Copy link
Member

hiddeco commented Feb 25, 2019

OK. Bear in mind that adding things to the CRD is hard to back out of.

As the flag is a valid config flag for all helm install|upgrade operations I do not see it getting removed from the CRD (as users may permanently need it for whatever chart setup they have). I would rather expect us to add some mechanics in the future to make the operation you described above more seamless.

@stefanprodan stefanprodan merged commit 193dff6 into master Feb 25, 2019
@stefanprodan stefanprodan deleted the helm-force-upgrade branch February 25, 2019 15:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants