-
Notifications
You must be signed in to change notification settings - Fork 122
Description
I'm proposing a feature addition to chaoskube that would add the ability suspend the chaos during nights, weekends and holidays using the following command-line options. These are designed to be somewhat consistent with the current pattern of chaoskube options as well as the configuration options for Chaos Monkey. They should be self-explanatory:
--observe-off-times true # defaults to false
--location 'America/New_York' # , or 'UTC'. Req'd if observe-off-times is true
--offdays 'Saturday, Sunday' # default
--workhours 'start=09:00, end=17:00' # default
--holidays '2017-12-25, 2018-01-01' # defaults to empty list
The options above imply that both --observe-off-times true
and --location '...'
must be present for the feature to take effect. There is purposefully no default location so the user is forced to provide this, since most SRE staff is probably not working in the GMT timezone, so defaulting to UTC would not really make sense in this case.
Note that this requires a IANA Time Zone as opposed to a three-letter timezone abbreviation such as 'EDT' or 'EST', that would have to change with Daylight Saving conventions. Daylight Saving is automatically accounted for by using the IANA Time Zones.
I intend to post a PR as soon as I have this implemented, but wanted to get some feedback in case I'm missing something.