forked from asobti/kube-monkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
param.go
102 lines (86 loc) · 2.81 KB
/
param.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package param
const (
// If set to true, Pod terminations are only logged and pods are
// not actually killed.
// Type: bool
// Default: true
DryRun = "kubemonkey.dry_run"
// The timezone to use when scheduling Pod terminations
// Type: string
// Default: UTC
Timezone = "kubemonkey.time_zone"
// The hour of the weekday when the scheduler should run
// to schedule terminations
// Must be less than StartHour, and [0,23]
// Type: int
// Default: 8
RunHour = "kubemonkey.run_hour"
// The hour beginning at which pod terminations may occur
// Should be set to a time when service owners are expected
// to be available
// Must be less than EndHour, and [0, 23]
// Type: int
// Default: 10
StartHour = "kubemonkey.start_hour"
// The end hour beyond which no pod terminations will occur
// Should be set to a time when service owners are expected
// to be available
// Must be [0,23]
// Type: int
// Default: 16
EndHour = "kubemonkey.end_hour"
// The amount of time in seconds a pod is given
// to shut down gracefully, before Kubernetes does
// a hard kill
// Type: int
// Default: 5
GracePeriodSec = "kubemonkey.graceperiod_sec"
// A list of namespaces for which terminations should never
// be carried out.
// Type: list
// Default: [ "kube-system" ]
BlacklistedNamespaces = "kubemonkey.blacklisted_namespaces"
// Set to true to enable debug mode
// Type: bool
// Default: false
DebugEnabled = "debug.enabled"
// Delay duration in sec after kube-monkey is launched
// after which scheduling is run
// Use when debugging to run scheduling sooner
// Type: int
// Default: 30
DebugScheduleDelay = "debug.schedule_delay"
// If set to true, terminations will be guaranteed
// to be scheduled for all eligible Deployments,
// i.e., probability of kill = 1
// Type: bool
// Default: false
DebugForceShouldKill = "debug.force_should_kill"
// If set to true, pod terminations will be scheduled
// sometime in the next 60 sec to facilitate
// debugging (instead of the hours specified by
// StartHour and EndHour)
// Type: bool
// Default: false
DebugScheduleImmediateKill = "debug.schedule_immediate_kill"
// InCluster if set to true, we're running in a cluster
// otherwise we're developing and running outside
// Type: bool
// Default: true
InCluster = "incluster.enabled"
// WhitelistedNamespace is the list of namespaces
// where terminations can be carried out
// Type: list
// Default: [ "default" ]
WhitelistedNamespaces = "kubemonkey.whitelisted_namespaces"
// KubeConfigPath is the path to one's local
// kubeconfig configuration file
// Type: string
// Default: ~/.kube/config
KubeConfigPath = "incluster.kubeconfigpath"
// KubeMonkeyAppName is the app's name
// for identification in events
// Type: string
// Default: kube-monkey
KubeMonkeyAppName = "kubemonkey.appname"
)