arnold
arnold copied to clipboard
Scale down pods on the previous stack after switching
Feature Request
Is your feature request related to a problem or unsupported use case? Please describe.
After a blue/green deployment, keeping the previous
stack for a few days is important in case we need to quickly rollback the code. However, on projects that are scaled up with many replica pods, keeping a stack with all its pods mobilizes a lot of resources for nothing.
Describe the solution you'd like
- [ ] Automatically scale down a stack after switching it to
previous
e.g all pods set to x1 replica - [ ] Automatically scale up the
previous
stack before initiating a rollback ie all pods set to the number of replica specified in their intial specification.
To go a bit further in our brainstorming:
- the
next
stack should also be deployed with a limited number of pods and only scaled up just before switching, - when scaling down the
previous
stack, we should not scale down celery workers because they still have tasks to handle after switching (can take up to a few hours to finish them so maybe we should also find a way to forbid deleting the previous stack before its workers have finished handling their tasks...)