forked from CARV-ICS-FORTH/frisbee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
10.metrics-driven-partition.yml
50 lines (47 loc) · 1.36 KB
/
10.metrics-driven-partition.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
---
apiVersion: frisbee.io/v1alpha1
kind: TestPlan
metadata:
name: metrics-driven-partition
spec:
actions:
# Create an iperf server
- action: Service
name: server
service:
templateRef: iperf2.server
inputs:
- { "cpu": "2", memory: "4Gi" }
# Create an iperf client to generate background noise
- action: Service
name: noise
depends: { running: [ server ] }
service:
templateRef: iperf2.client
inputs:
- { server: .service.server.one, seconds: "800" }
# Create a cluster of iperf clients
- action: Cluster
name: clients
depends: { running: [ server ] }
cluster:
templateRef: iperf2.client
instances: 20
inputs:
- { server: .service.server.one, seconds: "300" }
schedule:
cron: "@every 1m"
placement:
collocate: true
# Because we cannot set dependencies on dynamic events, we need
# another way to handle execution driven chaos.
- action: Cascade
name: partition0
depends: { running: [ server, noise ] }
cascade:
templateRef: system.chaos.network.partition
inputs:
- { targets: .service.noise.one, duration: "2m" }
schedule:
conditions:
metrics: "avg() of query(wpFnYRwGk/2/bitrate, 5m, now) is below(500)"