sablierapp / sablier

Start your containers on demand, shut them down automatically when there's no activity. Docker, Docker Swarm Mode and Kubernetes compatible.
https://sablierapp.dev/
GNU Affero General Public License v3.0
1.36k stars 46 forks source link

Allow filtering services by labels #123

Closed dvkch closed 1 year ago

dvkch commented 1 year ago

Hello!

Thanks for this amazing tool! I am currently using it in a Traefik/Swarm scenario, and was wondering about replacing selecting the services using names with a label or an env on the service itself.

That would allow to add new services to a swarm easily, and let Sablier know if it needs to handle it or not, without having to edit Sablier's config everytime.

Thanks for considering :)

acouvreur commented 1 year ago

Very good suggestion, it would also allow to configure specific requirements which I wasn't able to do correctly, such a number of replicas.

Only kubernetes had this feature.

I will probably do this as a PoC when I have the time.

Feel free to open a PR in the meantime :)

dvkch commented 1 year ago

Unfortunately I don't think i have the knowledge in Go to be able to help a lot on this, but i will definitely take a shot at it and keep you posted if i can help in any way ! Thank you for your answer 😊

acouvreur commented 1 year ago

Just FYI, this was released in beta #134

You can try it out already using version 1.4.0-beta.1.

Thanks again for mentioning this, I think I will make it the default behavior from now on.

I will change all my doc from names to groups soon

dvkch commented 1 year ago

This is amazing news! I currently don't have a setup that could make use of it anymore, but do plan on creating a new swarm, I will definitely keep you updated on how that goes using this 😊