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

Rollback failed Helm releases in git #1742

Closed
gtseres opened this issue Feb 14, 2019 · 5 comments
Closed

Rollback failed Helm releases in git #1742

gtseres opened this issue Feb 14, 2019 · 5 comments
Labels

Comments

@gtseres
Copy link
Contributor

gtseres commented Feb 14, 2019

When pushing a new HelmRelease object, there is a case that when Flux tries to deploy it, the helm installation/upgrade command will fail to be executed. In that case, we have the HelmRelease changed in git, but not actually deployed in the cluster (the previous version is still running). An idea would be for Flux to revert the HelmRelease change in git, so that the git repo and the cluster are kept in sync (do not deviate).

@gtseres gtseres changed the title Rollback failed Helm releases in Github Rollback failed Helm releases in git Feb 14, 2019
@hiddeco
Copy link
Member

hiddeco commented Feb 15, 2019

Flux sees git as the desired state, a failing release does not mean your desire changes; just that it was not possible to fulfill it.

If Flux would rollback the release to the old state, the automation would kick in again (e.g. to deploy the new detected image), and you end up in an infinite loop of unrolling a failure, rolling back, Flux changing the image, repeat...

However, the Helm operator might do a better job at exposing divergences, so you are able to either let a human take a look at it in time or write your own automated rollback logic once a divergence is detected.

@hiddeco hiddeco added the helm label Feb 15, 2019
@2opremio
Copy link
Contributor

After #1019 is merged, you will effectively be able roll the HelmRelease back by removing the from git repository.

@hiddeco
Copy link
Member

hiddeco commented Feb 15, 2019

After #1442 is merged, you will effectively be able roll the HelmRelease back by removing the from git repository.

As the Helm operator purges a deleted HelmRelease this will not roll it back but undo the deployment as a whole. Which, I think, is not the desired effect.

@2opremio
Copy link
Contributor

As the Helm operator purges a deleted HelmRelease this will not roll it back but undo the deployment as a whole. Which, I think, is not the desired effect.

Fair point

@kingdonb
Copy link
Member

kingdonb commented Apr 7, 2021

The relevant section from the Flux v2 docs:

https://toolkit.fluxcd.io/components/helm/helmreleases/#configuring-failure-remediation

This topic has evolved into the next generation of Flux! Closing, Flux v1 is in maintenance.

@kingdonb kingdonb closed this as completed Apr 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants