argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
16.33k stars 4.93k forks source link

Provide a way to intercept the rollback function logic with custom logic #18072

Open AndresPinerosZen opened 2 weeks ago

AndresPinerosZen commented 2 weeks ago

Summary

I think this is a problem many have experienced in the past with ArgoCD rollbacks. ArgoCD promotes AutoSync, which means that the only way to rollback is from Git. Argo could potentially run the necessary git reverts and push to the repository automatically but it doesn't at the moment. In order to provide the automated Git reverts when users interact with the interface, would it be acceptable to create a hook that users can plug with their custom logic to replace the logic implemented by the rollback function?

If I could do this, I'd just automate the Git revert after a user clicks the rollback button.

Motivation

I want easy rollbacks without having to disable AutoSync.

Proposal

A) Provide the option to enable automatic Git Reverts in the rollback logic. B) Provide a mechanism that allows external systems to implement rollback logic with hooks.