Deployment rollback (at least for Helm)
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
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 thanks for opening this issue! Yes, I think an event like onError is actually a good idea. I'll add this as a feature
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.