Skip to content

Commit

Permalink
Merge branch 'krkn-chaos:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tsebastiani authored Apr 25, 2024
2 parents 434cd76 + bbfe4fe commit 3c1e5d0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
4 changes: 1 addition & 3 deletions docs/pod-scenarios.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ POD_LABEL | Label of the pod(s) to target
NAME_PATTERN | Regex pattern to match the pods in NAMESPACE when POD_LABEL is not specified | .* |
DISRUPTION_COUNT | Number of pods to disrupt | 1 |
KILL_TIMEOUT | Timeout to wait for the target pod(s) to be removed in seconds | 180 |
WAIT_TIMEOUT | Seconds to wait for the pod recovery to match EXPECTED_POD_COUNT | 360 |
EXPECTED_POD_COUNT | Total pod count matching the label to verify post disruption ( REQUIRED when POD_LABEL is set )| "" |

EXPECTED_RECOVERY_TIME | Fails if the pod disrupted do not recover within the timeout set | 120 |

**NOTE** Set NAMESPACE environment variable to `openshift-.*` to pick and disrupt pods randomly in openshift system namespaces, the DAEMON_MODE can also be enabled to disrupt the pods every x seconds in the background to check the reliability.

Expand Down
3 changes: 1 addition & 2 deletions pod-scenarios/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ export NAMESPACE=${NAMESPACE:="openshift-.*"}
export POD_LABEL=${POD_LABEL:=""}
export NAME_PATTERN=${NAME_PATTERN:=".*"}
export DISRUPTION_COUNT=${DISRUPTION_COUNT:=1}
export EXPECTED_POD_COUNT=${EXPECTED_POD_COUNT:=""}
export KILL_TIMEOUT=${KILL_TIMEOUT:=180}
export WAIT_TIMEOUT=${WAIT_TIMEOUT:=360}
export EXPECTED_RECOVERY_TIME=${EXPECTED_RECOVERY_TIME:=120}
export SCENARIO_TYPE=${SCENARIO_TYPE:=plugin_scenarios}
export SCENARIO_FILE=${SCENARIO_FILE:=scenarios/pod_scenario.yaml}
export SCENARIO_POST_ACTION=${SCENARIO_POST_ACTION:=""}
7 changes: 1 addition & 6 deletions pod-scenarios/pod_scenario.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@
label_selector: $POD_LABEL
kill: $DISRUPTION_COUNT
timeout: $KILL_TIMEOUT
- id: wait-for-pods
config:
namespace_pattern: $NAMESPACE
label_selector: $POD_LABEL
count: $EXPECTED_POD_COUNT
timeout: $WAIT_TIMEOUT
krkn_pod_recovery_time: $EXPECTED_RECOVERY_TIME
1 change: 1 addition & 0 deletions pod-scenarios/pod_scenario_namespace.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
name_pattern: $NAME_PATTERN
kill: $DISRUPTION_COUNT
timeout: $KILL_TIMEOUT
krkn_pod_recovery_time: $EXPECTED_RECOVERY_TIME

0 comments on commit 3c1e5d0

Please sign in to comment.