argoproj / argo-rollouts

Progressive Delivery for Kubernetes
https://argo-rollouts.readthedocs.io/
Apache License 2.0
2.72k stars 848 forks source link

Support queue worker paradigm #438

Open derekperkins opened 4 years ago

derekperkins commented 4 years ago

Currently argo-rollouts mainly targets http/grpc services, which is great for that use case. Most companies also have queue driven workers that would benefit from the same type of deployment strategy. Rather than managing the traffic directly like you can with a service / mesh, this would require more integration from the application, but I think it could be handled without major architectural changes to rollouts as is.

My hope would be able to set up a watch on the Rollout object as it progresses through its various states, and configure my application accordingly. For example, if my current replicaset is in the preview state for blue/green, I would expect to be able to watch an annotation or a label on the replicaset itself, or alternatively watch the status field of the core rollout object. While in preview mode, I might set my worker to run as normal, but rollback any database transactions rather than committing them. When promotion happens, my app would see that in the watch and start committing those transactions.

I understand that it might not be as magical as being able to migrate live traffic, I believe it is a common use case that isn't being served today. As is, I could probably hack rollouts to do what I'm suggesting by deploying two services that don't serve any purpose except to be the meta that my app would watch. It just seems like unnecessary churn and ip allocation.

derekperkins commented 4 years ago

cc @whizard

derekperkins commented 4 years ago

455 will help with this

aldor007 commented 1 year ago

Hey, any updates regarding this topic?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity.

kostis-codefresh commented 8 months ago

This can be done today by using

1) https://github.com/argoproj/argo-rollouts/issues/455 (ephemeral labels) 2) The downward api https://kubernetes.io/docs/concepts/workloads/pods/downward-api/ 3) Any application that can reload its configuration when it changes

I am preparing a detailed guide (using rabbitmq as an example) and I will post it here when ready

kostis-codefresh commented 7 months ago

Detailed article https://codefresh.io/blog/progressive-delivery-for-stateful-services-using-argo-rollouts/