kube-monkey icon indicating copy to clipboard operation
kube-monkey copied to clipboard

Purpose of run_hour is not clear

Open arun-gupta opened this issue 6 years ago • 4 comments

This is config.toml sample from the docs:

[kubemonkey]
dry_run = true                           # Terminations are only logged
run_hour = 8                             # Run scheduling at 8am on weekdays
start_hour = 10                          # Don't schedule any pod deaths before 10am
end_hour = 16                            # Don't schedule any pod deaths after 4pm
blacklisted_namespaces = ["kube-system"] # Critical apps live here

Per this sample, what goes on between 8am and 10am? What is the purpose of specifying run_hour in addition to start_hour?

Also, is there no provision to run this on weekends?

arun-gupta avatar Jul 11 '18 01:07 arun-gupta

run_hour is when the schedule for the day is made start_hour and end_hour book-end the times of the day when pods may be killed.

If you feel this can be better expressed in the documentation, feel free to submit a PR.

asobti avatar Jul 11 '18 02:07 asobti

Does it matter to the user when the schedule is made? It feels like an extra parameter that the user has to specify where as a default value can be assumed for it. Or is there a default value and this is an optional parameter?

arun-gupta avatar Jul 11 '18 02:07 arun-gupta

You're correct that it should not matter to the user. As of now, it defaults to 8am, but coming to think of it, a better default value might be start_hour. So, if you do not override run_hour, scheduling just runs whenever kube-monkey is ready to start killing apps.

asobti avatar Jul 11 '18 02:07 asobti

I'm gonna think some more about it, but that does sound like a good idea. Also, I agree about the "one extra parameter to worry about" - I think run_hour should be removed from the basic example files, as to get started with the most basic usage of kube-monkey, you shouldn't need to worry about it.

asobti avatar Jul 11 '18 02:07 asobti