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

Suspend cronjobs #230

Closed hijak closed 10 months ago

hijak commented 10 months ago

hi

i am testing sablier for an environment with cronjobs. are there any plans to integrate cronjob scheduling so they can be suspended as well?

acouvreur commented 10 months ago

Could you please give more details ?

Are these regular cron ?

Are you referencing Kubernetes CronJob ?

What is your use case and how would you like Cron Jobs to be supported ?

hijak commented 10 months ago

yes kuberenetes cronjobs. for example

i have a deployment and a cronjob. the cronjob interacts with the pod in the deployment. if sablier pauses the deployment i will get a bunch of failed cronjobs due to the deployment being at zero.

also is there a minimum version of traefik needed to make this work? i am testing on traefik 2.10.5 and i just get a 404 when the deployment gets reduced by sablier. it doesnt seem to do anything to the marked deployment

acouvreur commented 10 months ago

Right now Sablier works through reverse proxies, so cron jobs wont be able to "wake up" the deployment internally I'm afraid.