-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f27c773
commit c76b5cc
Showing
10 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: StressChaos | ||
metadata: | ||
namespace: 12-factor-app | ||
name: burn-cpu-100 | ||
spec: | ||
selector: | ||
namespaces: | ||
- 12-factor-app | ||
labelSelectors: | ||
app.kubernetes.io/instance: 12-factor-app | ||
mode: all | ||
stressors: | ||
cpu: | ||
workers: 1 | ||
load: 100 | ||
duration: 30s |
39 changes: 39 additions & 0 deletions
39
dapr-distributed-calendar/chaos-engineering/chaos-on-the-rise.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
name: chaos-on-the-rise | ||
namespace: 12-factor-app | ||
spec: | ||
entry: entry | ||
templates: | ||
- name: entry | ||
templateType: Serial | ||
deadline: 2m | ||
children: | ||
- stress-test | ||
- pod-killer | ||
- name: stress-test | ||
templateType: StressChaos | ||
deadline: 10s | ||
stressChaos: | ||
selector: | ||
namespaces: | ||
- 12-factor-app | ||
labelSelectors: | ||
app: controller | ||
mode: all | ||
stressors: | ||
cpu: | ||
workers: 1 | ||
load: 100 | ||
- name: pod-killer | ||
templateType: PodChaos | ||
deadline: 60s | ||
podChaos: | ||
selector: | ||
namespaces: | ||
- 12-factor-app | ||
labelSelectors: | ||
app: controller | ||
mode: all | ||
action: pod-kill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: traefik.io/v1alpha1 | ||
kind: IngressRoute | ||
metadata: | ||
name: chaos-ingress | ||
namespace: chaos-testing | ||
spec: | ||
entryPoints: | ||
- web | ||
routes: | ||
- match: Host(`chaos.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`) | ||
kind: Rule | ||
services: | ||
- name: chaos-dashboard | ||
port: 2333 |
20 changes: 20 additions & 0 deletions
20
dapr-distributed-calendar/chaos-engineering/network-bandwith.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: NetworkChaos | ||
metadata: | ||
name: network-bandwidth-100kbps | ||
namespace: 12-factor-app | ||
spec: | ||
action: bandwidth | ||
mode: all | ||
selector: | ||
namespaces: | ||
- 12-factor-app | ||
labelSelectors: | ||
app.kubernetes.io/instance: 12-factor-app | ||
bandwidth: | ||
rate: 100kbps | ||
limit: 100 | ||
buffer: 10000 | ||
peakrate: 1000000 | ||
minburst: 1000000 | ||
duration: "10s" |
17 changes: 17 additions & 0 deletions
17
dapr-distributed-calendar/chaos-engineering/network-corrupt.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: NetworkChaos | ||
metadata: | ||
name: network-corrupt-example | ||
namespace: 12-factor-app | ||
spec: | ||
action: corrupt | ||
mode: all | ||
selector: | ||
namespaces: | ||
- 12-factor-app | ||
labelSelectors: | ||
app.kubernetes.io/instance: 12-factor-app | ||
corrupt: | ||
corrupt: "40" | ||
correlation: "25" | ||
duration: "10s" |
14 changes: 14 additions & 0 deletions
14
dapr-distributed-calendar/chaos-engineering/pod-failure.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: PodChaos | ||
metadata: | ||
namespace: 12-factor-app | ||
name: pod-failure-example | ||
spec: | ||
selector: | ||
namespaces: | ||
- 12-factor-app # the namespace of the system under test (SUT) you've deployed | ||
labelSelectors: | ||
app.kubernetes.io/instance: 12-factor-app # the label of the pod for chaos injection | ||
mode: all # the mode to run chaos action; supported modes are one/all/fixed/fixed-percent/random-max-percent | ||
action: pod-failure # the specific chaos action to inject; supported actions: pod-kill/pod-failure/container-kill | ||
duration: 60s # duration for the injected chaos experiment |
21 changes: 21 additions & 0 deletions
21
dapr-distributed-calendar/chaos-engineering/schedule-chaos.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: Schedule | ||
metadata: | ||
namespace: 12-factor-app | ||
name: scheduled-pod-failure | ||
spec: | ||
schedule: 5 * * * * | ||
startingDeadlineSeconds: null | ||
concurrencyPolicy: Forbid | ||
historyLimit: 2 | ||
type: PodChaos | ||
podChaos: | ||
selector: | ||
namespaces: | ||
- 12-factor-app | ||
labelSelectors: | ||
app: controller | ||
mode: one | ||
action: pod-failure | ||
duration: 1m | ||
gracePeriod: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters