Closed kehralexander closed 3 months ago
Hey! Currently, yeah, the way to achieve that would be to make a sleep schedule per deployment. I can see how having a list of deployments and ingresses would be nice though, because hitting one of the services would wake an entire set of deployments up.
I'll be adding some form of this functionality soon, so I'll definitely keep this suggestion in mind!
Or something like a wildcard? I'd like to do that on all deployments of a namespace.
@m3shat @antoniomacri I've just released v0.4.0, which now takes a list of deployments and ingresses:
apiVersion: snorlax.moonbeam.nyc/v1beta1
kind: SleepSchedule
metadata:
namespace: your-app-namespace
name: your-app
spec:
wakeTime: '8:00am'
sleepTime: '10:00pm'
timezone: 'America/New_York'
deployments:
- your-app-frontend
- your-app-db
- your-app-redis
ingresses:
- your-app-ingress
@antoniomacri Gonna add supporting wildcards to the list
Why?
We have some software consisting of multiple deployments, of which have to be awake in the middle of the night to do some scheduled tasks. Instead of waking up the whole instance, in our case it would be better to just don't put some parts of the application to sleep.
Alternatives?
I guess we could create a
SleepSchedule
per deployment? I'm not sure how/if it's possible to wake up then on an incoming request. Supporting multiple deployments perSleepSchedule
would be a cleaner solution IMHO.