devspace icon indicating copy to clipboard operation
devspace copied to clipboard

Deployment rollback (at least for Helm)

Open iSeiryu opened this issue 5 years ago • 2 comments

Is your feature request related to a problem? kinda

Which solution do you suggest? It would be a great feature if devspace could deploy an image, wait for it to start, check readiness probe and rollback in case of a failure and report about it somehow so the CI/CD pipeline would crash and output some meaningful info. Adding an ability to execute a script when this happens would be a nice touch too.

Which alternative solutions exist? Adding --wait to a deployment and manually detecting when a deployment crashes and invoking one of these commands:

helm rollback my-api <revision>
kubectl rollout undo deployment.v1.apps/my-api-deployment --to-revision=<revision>

But before running those commands I'd need to do some queries to know the deployment names and the previous revision number. It requires a lot of additional scripts that someone would have to maintain.

/kind feature

iSeiryu avatar Dec 03 '20 19:12 iSeiryu

Tools like Vamp and Garden are capable of doing a rollback: https://docs.garden.io/using-garden/workflows#how-it-works. Garden has onError event. Maybe devspace could add onError hooks too? https://learnk8s.io/kubernetes-rollbacks

iSeiryu avatar Dec 03 '20 19:12 iSeiryu

@iSeiryu thanks for opening this issue! Yes, I think an event like onError is actually a good idea. I'll add this as a feature

FabianKramm avatar Dec 07 '20 09:12 FabianKramm

Closing due to inactivity and the version used. If you are still facing this issue with our latest DevSpace version, please open a new issue.

deniseschannon avatar May 21 '24 18:05 deniseschannon