Skip to content

Schedule

Describes Hibernator chart 0.12.44

The working hours tell Hibernator when your workloads run. Outside them, Hibernator hibernates the workloads. It cannot be bargained with: it follows the schedule exactly as you write it.

Set the working hours under config.workingHours. These are the chart defaults:

config:
workingHours:
timezone: "Europe/Berlin"
schedule:
monday: "08:00-20:00"
tuesday: "08:00-20:00"
wednesday: "08:00-20:00"
thursday: "08:00-20:00"
friday: "08:00-20:00"
saturday: "off"
sunday: "off"

When the working hours end, Hibernator hibernates the cluster. When they start, it wakes the cluster. A wake that a user requests outside working hours lasts until its expiry; then the schedule decides again. how-it-works.md tells the whole day.

The Schedule page of the UI shows the next scheduled transition and the working hours of each day.

Each day holds one of these:

  • off: no working hours. The workloads stay hibernated for the whole day.
  • on: working hours for the whole day. The workloads stay awake for 24 hours.
  • One time range, HH:MM-HH:MM, such as 08:00-20:00.
  • More than one time range, separated by a comma with no space, such as 08:00-12:00,13:00-17:00. The workloads hibernate between the ranges.
monday: "08:00-20:00" # one range
tuesday: "08:00-12:00,13:00-17:00" # two ranges
friday: "08:00-12:00,22:00-02:00" # the second range ends on Saturday
saturday: "off" # no working hours
sunday: "on" # awake for 24 hours

The rules:

  • Put each value in quotes. Without quotes, YAML reads on and off as true and false, and the chart refuses them.
  • Write the time in 24-hour format, with two digits for the hour and two for the minute: 08:00, not 8:00.
  • The hour is 00 to 23. The minute is 00 to 59.
  • A range starts and ends at different minutes.
  • A range that ends before it starts goes past midnight and belongs to the day it starts on. 22:00-02:00 on Friday keeps the workloads awake until 02:00 on Saturday, also when Saturday is off.
  • Write off and on in lower case.

A day that you leave out of your values file keeps its chart default.

The chart checks the schedule when you install or upgrade, and it refuses a value that breaks a rule:

Value Why the chart refuses it
"8:00-20:00" The hour has one digit
"08:00-25:00" There is no hour 25
"08:77-20:00" There is no minute 77
"08-00-20-00" The separator between hour and minute is a colon
"08:00-12:00, 13:00-17:00" A space follows the comma
"Off" off is in lower case
on, without quotes YAML reads it as true, not as text
"08:00-08:00" The range starts and ends at the same minute

For a value with the wrong form, helm install and helm upgrade stop with an error from the chart’s schema that names the day:

Error: values don't meet the specifications of the schema(s) in the following chart(s):
hibernator:
- at '/config/workingHours/schedule/monday': '8:00-20:00' does not match pattern '^(off|on|([0-1][0-9]|2[0-3]):[0-5][0-9]-([0-1][0-9]|2[0-3]):[0-5][0-9](,([0-1][0-9]|2[0-3]):[0-5][0-9]-([0-1][0-9]|2[0-3]):[0-5][0-9])*)$'

For a range that starts and ends at the same minute, the error comes from the chart’s templates. It names the day and ends like this:

config.workingHours.schedule.saturday: '08:00-08:00' starts and ends at the same minute. Write 'off' for a day without working hours, or 'on' for a day that is awake for 24 hours

config.workingHours.timezone is an IANA time zone name, such as Europe/Berlin (the default) or America/New_York. Hibernator reads the working hours as local time in that zone, and it follows daylight saving time.

The chart does not check the name. The API and the controller refuse a name they do not know when they start, and the pods do not start.

Admins can change the working hours in the UI, on the Working Hours tab of the Schedule Config page. A day changed there overrides the same day of your values file. The tab takes the same values as your values file, and it saves Off or ON in lower case.

On the same page, admins can set schedule windows: a schedule for a range of dates, such as a holiday week. While a schedule window is active, it replaces the working hours.

The UI keeps these changes in the ConfigMap hibernator-config-overlay, apart from your values file. If a change to your values file has no effect, look for an override or a schedule window on the Schedule Config page.

config.holidays.regions names the countries and regions whose public holidays show in the calendar on the Schedule Config page. The list is empty by default. The holidays do not change the working hours.

config:
holidays:
regions:
- country: "US"
state: "CA"
label: "USA (California)"
- country: "GB"
state: ""
label: "United Kingdom"

The country and state codes are those of the date-holidays package.