deploykit
deploykit copied to clipboard
Scale Group size down to 0
Hello,
There are cases in which I would like a group to be scaled down to 0, i.e. for autoscaling. but right now i think https://github.com/docker/infrakit/blob/master/pkg/plugin/group/group.go#L344 is preventing me from doing that.
Group swarm-workers at 0 instancesCRIT[10-05|22:23:28] error executing module=main cmd=infrakit err="Allocation must not be blank" fn=main.main
Allocation must not be blank
I also tried using destroy-instances
but all i get is:
infrakit group destroy-instances swarm-workers
Initiated.
but the instances are never destroyed.
obviously i can destroy the group altogether but when i want to scale back up again i would then have to recommit the groups file which isn't ideal.
It would be nice if we can scale the group down to 0.
Thanks!
Also, can we commit a group of 0 size?
The use case is that our scripts always want to commit a workers
group, even if it is of size 0. We would like the group to exist so that we could statically define in in a LB configuration (ie, we want to the config to always include group/workers
and group/managers
in the backend nodes, even if workers
has 0 members).