Adds ability to configure frequency for pod termination via annotation #353
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Adds ability to configure frequency for pod termination via annotation.
Closes #20
Allows specifying a new command line flag,
--termination-frequency-annotationwhich sets the annotation to look for and use to calculate the approximate frequency at which to terminate a given pod. Follows the examples given in #20, such as...chaos.alpha.kubernetes.io/frequency=2/dayfor "kill this twice per day"chaos.alpha.kubernetes.io/frequency=10/hourfor "kill this ten times per hour"chaos.alpha.kubernetes.io/frequency=1/weekfor "kill this once a week"chaos.alpha.kubernetes.io/frequency=0.5/dayfor "kill this pod once every two days"Pods without the annotation are assumed to always be candidates for termination. The
--max-killflag also still applies and will potentially limit how frequently a pod is terminated if it isn't high enough.