forked from powerfulseal/powerfulseal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_config.yml
171 lines (147 loc) · 4.11 KB
/
example_config.yml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
config:
minSecondsBetweenRuns: 60
maxSecondsBetweenRuns: 360
# the scenarios describing actions on nodes
nodeScenarios:
# example of a policy using al the filters available
- name: "kill all the baddies"
# Choose the initial set of nodes to operate on.
# Note that this will be an union of all the notes you match (logical OR)
match:
- property:
name: "name"
value: "minion-*"
- property:
name: "ip"
value: "127.0.0.1"
- property:
name: "group"
value: "minion"
- property:
name: "az"
value: "AZ1|AZ2"
- property:
name: "state"
value: "UP"
# The filters are executed in the order specified and can be
# used mutiple times, and piped from one to the next.
filters:
# property filters (all the property filters support regexp)
- property:
name: "name"
value: "minion-*"
- property:
name: "ip"
value: "127.0.0.1"
- property:
name: "group"
value: "minion"
- property:
name: "az"
value: "AZ1|AZ2"
- property:
name: "state"
value: "UP"
# time of execution filters
# to restrict the actions to work days, you can do
- dayTime:
onlyDays:
- "monday"
- "tuesday"
- "wednesday"
- "thursday"
- "friday"
startTime:
hour: 10
minute: 0
second: 0
endTime:
hour: 17
minute: 30
second: 0
# to pick a random sample of nodes/pods, you can specify either a size
- randomSample:
size: 5
# or a ratio (will be rounded down to an integer)
- randomSample:
ratio: 0.2
# this will pass all the nodes with the given probability,
# or none otherwise
- probability:
probabilityPassAll: 0.5
# The actions will be executed in the order specified
actions:
- stop:
force: false
- wait:
seconds: 30
- start:
- execute:
cmd: "sudo service docker restart"
# the scenarios describing actions on kubernetes pods
podScenarios:
- name: "delete random pods"
# Match the intial set of pods.
# The set of pods will be a union of all matches.
match:
# you can pick a whole namespace
- namespace:
name: "doomsday"
# you can pick a particular deployment
- deployment:
name: "doomsday"
namespace: "example"
# throw in another one to the union
- deployment:
name: "dangerous"
namespace: "moyk"
# you can also select labels in a namespace
# (note that for the labels are always strings)
- labels:
namespace: "something"
selector: "app=true,something=1"
filters:
# property filters (all the property filters support regexp)
- property:
name: "name"
value: "application-X-*"
- property:
name: "state"
value: "Running"
# time of execution filters
# to restrict the actions to work days, you can do
- dayTime:
onlyDays:
- "monday"
- "tuesday"
- "wednesday"
- "thursday"
- "friday"
startTime:
hour: 10
minute: 0
second: 0
endTime:
hour: 17
minute: 30
second: 0
# to pick a random sample of nodes/pods, you can specify either a size
- randomSample:
size: 5
# or a ratio (will be rounded down to an integer)
- randomSample:
ratio: 0.2
# this will pass all the nodes with the given probability,
# or none otherwise
- probability:
probabilityPassAll: 0.5
# The actions will be executed in the order specified
actions:
- kill:
probability: 0.5
force: true
- wait:
seconds: 5
- kill:
probability: 1
force: true