Scheduling containers
Levv allows you to schedule the scaling of your applications, reducing their footprint outside of business hours. You can scale the number of replicas down to avoid unnecessary consumption of ressources, and even scale them down to 0 to avoid any costs when your application is not running.
To configure the scheduling of your application, you can use the following labels:
| LABEL | FORMAT | DESCRIPTION |
|---|---|---|
io.levv.schedule.start_time |
hh:mm | When your application scales up to # replicas (required) |
io.levv.schedule.end_time |
hh:mm | When your application scales down to # min_replicas (required) |
io.levv.schedule.day_of_month |
number, range | Which days of the month (default: *) |
io.levv.schedule.month |
number, name, range | Which months of the year (default: *) |
io.levv.schedule.day_of_week |
number, name, range | Which days of the week (default: *) |
io.levv.schedule.timezone |
timezone name | Timezone (default: UTC) |
io.levv.schedule.min_replicas |
number | The number of replicas (default: 0) |
day_of_month, month and day_of_week labels use the traditional CRON syntax.
Example:
labels:
io.levv.schedule.start_time: "9:00" # START AT 9AM
io.levv.schedule.end_time: "17:00" # UNTIL 5PM
io.levv.schedule.day_of_month: "1-7" # RUN FROM THE 1ST OF THE MONTH UNTIL THE 7TH
io.levv.schedule.month: "jan,feb" # RUN IN JANUARY AND FEBRUARY
io.levv.schedule.day_of_week: "mon,wed,thu,fri" # RUN ON MONDAY WEDNESDAY THURSDAY AND FRIDAY
io.levv.schedule.timezone: "Europe/Brussels" # TIMEZONE
io.levv.schedule.min_replicas: 1 # SCALE DOWN TO 1 REPLICA INSTEAD OF ZERO