Skip to content

Commit

Permalink
Adding random regex pod kill
Browse files Browse the repository at this point in the history
  • Loading branch information
paigerube14 committed Jul 6, 2020
1 parent 07db8f4 commit 13d6e5e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ kraken:
kubeconfig_path: /root/.kube/config # Path to kubeconfig
scenarios: # List of policies/chaos scenarios to load
- scenarios/etcd.yml
- scenarios/openshift-kube-apiserver.yml
- scenarios/openshift-kube-apiserver.yml
- scenarios/openshift-apiserver.yml
- scenarios/regex_openshift_pod_kill.yml

cerberus:
cerberus_enabled: False # Enable it when cerberus is previously installed
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
datetime
pyfiglet
powerfulseal==3.0.0rc9
git+https://github.com/bloomberg/powerfulseal.git@master
requests
21 changes: 21 additions & 0 deletions scenarios/regex_openshift_pod_kill.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
config:
runStrategy:
runs: 1
maxSecondsBetweenRuns: 30
minSecondsBetweenRuns: 1
scenarios:
- name: kill one pod in openshift namespace
steps:
- podAction:
matches:
- namespace: "openshift-.*"
filters:
# property filters (all the property filters support regexp)
- property:
name: "state"
value: "Running"
- randomSample:
size: 3
actions:
- kill:
probability: .7

0 comments on commit 13d6e5e

Please sign in to comment.