Skip to content

Commit

Permalink
Added support to kill prometheus pods
Browse files Browse the repository at this point in the history
  • Loading branch information
yashashreesuresh committed Jul 16, 2020
1 parent 58b51eb commit 205434f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ Component | Description
------------------------ | ---------------------------------------------------------------------------------------------------| ------------------------- |
Etcd | Kills a single/multiple etcd replicas for the specified number of times in a loop | :heavy_check_mark: |
Kube ApiServer | Kills a single/multiple kube-apiserver replicas for the specified number of times in a loop | :heavy_check_mark: |
ApiServer | Kills a single/multiple apiserver replicas for the specified number of times in a loop | :heavy_check_mark: |
Prometheus | Kills a single/multiple prometheus replicas for the specified number of times in a loop | :heavy_check_mark: |
22 changes: 22 additions & 0 deletions scenarios/post_action_prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
config:
runStrategy:
runs: 1
maxSecondsBetweenRuns: 10
minSecondsBetweenRuns: 1
scenarios:
- name: "check 2 pods are in namespace with selector: prometheus"
steps:
- podAction:
matches:
- labels:
namespace: "openshift-monitoring"
selector: "app=prometheus"
filters:
- property:
name: "state"
value: "Running"
# The actions will be executed in the order specified
actions:
- checkPodCount:
count: 2

23 changes: 23 additions & 0 deletions scenarios/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
config:
runStrategy:
runs: 1
maxSecondsBetweenRuns: 30
minSecondsBetweenRuns: 1
scenarios:
- name: "delete prometheus pods"
steps:
- podAction:
matches:
- labels:
namespace: "openshift-monitoring"
selector: "app=prometheus"

filters:
- randomSample:
size: 1

# The actions will be executed in the order specified
actions:
- kill:
probability: 1
force: true

0 comments on commit 205434f

Please sign in to comment.