Skip to content

Commit e4de3c7

Browse files
committed
[chaos-mesh] Add some chaos schedule
1 parent f8b8180 commit e4de3c7

10 files changed

+99
-11
lines changed

.github/workflows/docker_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build Docker and deploy
22
on:
33
push:
44
branches:
5-
- master
5+
- dag-master
66
workflow_dispatch:
77
release:
88
types: [ published ]
@@ -50,7 +50,7 @@ jobs:
5050
labels: ${{ steps.docker_meta.outputs.labels }}
5151
- name: deploy cluster
5252
# Only deploy on master.
53-
if: github.ref == 'refs/heads/master'
53+
if: github.ref == 'refs/heads/dag-master'
5454
shell: bash
5555
env:
5656
IMAGE_VERSION: ${{steps.docker_meta.outputs.version}}

kube/chaos/network-netem.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ spec:
88
mode: one
99
selector:
1010
namespaces:
11-
- default
11+
- starcoin-halley
1212
labelSelectors:
13-
"app": "starcoin"
13+
"app": "starcoin-0"
1414
delay:
1515
latency: "100ms"
1616
correlation: "25"

kube/chaos/network-partition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
mode: one
99
selector:
1010
namespaces:
11-
- default
11+
- starcoin-halley
1212
labelSelectors:
1313
"app": "starcoin"
1414
direction: to

kube/chaos/pod-kill-example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
mode: one
99
selector:
1010
namespaces:
11-
- default
11+
- starcoin-halley
1212
labelSelectors:
1313
"app": "starcoin"
1414
scheduler:

kube/chaos/pod-kill.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ spec:
88
mode: one
99
selector:
1010
namespaces:
11-
- default
11+
- starcoin-halley
1212
labelSelectors:
13-
"app": "starcoin"
13+
"app": "starcoin-0"
1414
scheduler:
1515
cron: "@every 20m"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
kind: Schedule
2+
apiVersion: chaos-mesh.org/v1alpha1
3+
metadata:
4+
namespace: starcoin-halley
5+
name: networkdelay
6+
spec:
7+
schedule: '*/15 * * * *'
8+
startingDeadlineSeconds: null
9+
concurrencyPolicy: Forbid
10+
historyLimit: 1
11+
type: NetworkChaos
12+
networkChaos:
13+
selector:
14+
namespaces:
15+
- starcoin-halley
16+
pods:
17+
starcoin-halley:
18+
- starcoin-0
19+
- starcoin-1
20+
- starcoin-2
21+
mode: one
22+
action: delay
23+
duration: 5m
24+
delay:
25+
latency: 50000ms
26+
correlation: '0'
27+
jitter: 50m
28+
direction: to
29+
target:
30+
selector:
31+
namespaces:
32+
- starcoin-halley
33+
pods:
34+
starcoin-halley:
35+
- starcoin-0
36+
- starcoin-1
37+
- starcoin-2
38+
mode: one
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
kind: Schedule
2+
apiVersion: chaos-mesh.org/v1alpha1
3+
metadata:
4+
namespace: starcoin-halley
5+
name: networkpartition
6+
spec:
7+
schedule: '*/30 * * * *'
8+
startingDeadlineSeconds: null
9+
concurrencyPolicy: Forbid
10+
historyLimit: 1000
11+
type: NetworkChaos
12+
networkChaos:
13+
selector:
14+
namespaces:
15+
- starcoin-halley
16+
pods:
17+
starcoin-halley:
18+
- starcoin-0
19+
mode: all
20+
action: partition
21+
duration: 5m
22+
direction: to
23+
target:
24+
selector:
25+
namespaces:
26+
- starcoin-halley
27+
pods:
28+
starcoin-halley:
29+
- starcoin-0
30+
mode: all
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
kind: Schedule
2+
apiVersion: chaos-mesh.org/v1alpha1
3+
metadata:
4+
namespace: starcoin-halley
5+
name: podkill
6+
spec:
7+
schedule: '* */1 * * *'
8+
startingDeadlineSeconds: null
9+
concurrencyPolicy: Forbid
10+
historyLimit: 1
11+
type: PodChaos
12+
podChaos:
13+
selector:
14+
namespaces:
15+
- starcoin-halley
16+
pods:
17+
starcoin-halley:
18+
- starcoin-1
19+
mode: all
20+
action: pod-kill

kube/chaos/time-chaos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
mode: one
88
selector:
99
namespaces:
10-
- default
10+
- starcoin-halley
1111
labelSelectors:
1212
"app": "starcoin"
1313
timeOffset: "-10m"

kube/manifest/starcoin-halley.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
matchLabels:
1212
app: starcoin
1313
serviceName: starcoin-svc
14-
replicas: 1
14+
replicas: 3
1515
template:
1616
metadata:
1717
name: starcoin
@@ -23,7 +23,7 @@ spec:
2323
starcoin/node-pool: seed-pool
2424
containers:
2525
- name: starcoin
26-
image: starcoin/starcoin:halley24_force_upgrade_v11
26+
image: starcoin/starcoin:dag-master
2727
imagePullPolicy: Always
2828
command:
2929
- bash

0 commit comments

Comments
 (0)