helmfile
helmfile copied to clipboard
Does helm file support Rollback like 'helm rollback <release> <revision>?
Can you please elaborate.Does helmfile suport rollback.If yes then how and also does it support rollback to previos version also like helm rollback <release> 0 to rollback to previos version.
@shikhar7 Hey! Helmfile itself doesn't have it.
That's mainly because we need a versioned source-of-truth for traveling time back to the pre-rollout version of your releases and there's no great option existed.
Fortunately, I can suggest now that leveraging GitOps with the recently-proposed helmfile build(#780), you'll be able to build helmfile rollback-like feature on top of any CI/CD that even works for multi-cluster, multi-region deployments.
It might be worth mentioning (IIUC how helmfile uses helm) that doing this manually (while waiting for helm build etc) may be feasible. How about this:
- run
helm history APP_RELEASE_NAMEon each of the apps mentioned in the helmfile - spot the ones that need rolling back, spot the revision ID to roll back to for each one (APP_REV_ID for each app)
- run
helm rollback APP_RELEASE_NAME APP_REV_IDfor each app
Did I miss anything?
There may be gotchas if pre/post hooks have been defined, and there may be downtime while you complete the loop (since some services not rolled back yet may not work properly while others are being rolled back). In some situations, kubectl scale --replicas 0 DEPLOYMENT_NAME may reduce noise. YMMV.
In the meantime, as a workaround, is there a way to say:
for deployment in helmfile list-deploys; do
helm rollback deployment
done
Because that would be good enough while we wait on helmfile build.