Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CI/scenarios/cluster_shut_down_scenario.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cluster_shut_down_scenario: # Scenario to stop all the nodes for specified duration and restart the nodes
runs: 1 # Number of times to execute the cluster_shut_down scenario
shut_down_duration: 120 # duration in seconds to shut down the cluster
cloud_type: aws # cloud type on which Kubernetes/OpenShift runs
17 changes: 17 additions & 0 deletions CI/scenarios/node_scenarios_example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
node_scenarios:
- actions: # node chaos scenarios to be injected
- node_stop_start_scenario
- stop_start_kubelet_scenario
- node_crash_scenario
node_name: # node on which scenario has to be injected
label_selector: node-role.kubernetes.io/worker # when node_name is not specified, a node with matching label_selector is selected for node chaos scenario injection
instance_kill_count: 1 # number of times to inject each scenario under actions
timeout: 120 # duration to wait for completion of node scenario injection
cloud_type: aws # cloud type on which Kubernetes/OpenShift runs
- actions:
- node_reboot_scenario
node_name:
label_selector: node-role.kubernetes.io/infra
instance_kill_count: 1
timeout: 120
cloud_type: aws
2 changes: 2 additions & 0 deletions ansible/templates/kraken.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ kraken:
kubeconfig_path: {{ kubeconfig_path }} # Path to kubeconfig
exit_on_failure: {{ exit_on_failure }} # Exit when a post action scenario fails
scenarios: {{ scenarios }} # List of policies/chaos scenarios to load
node_scenarios: {{ node_scenarios }} # List of chaos node scenarios to load
cluster_shut_down_scenario: {{ cluster_shut_down_scenario }}

cerberus:
cerberus_enabled: {{ cerberus_enabled }} # Enable it when cerberus is previously installed
Expand Down
2 changes: 2 additions & 0 deletions ansible/vars/kraken_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ kraken_repository: "{{ lookup('env', 'KRAKEN_REPOSITORY')|default('https://githu
# scenarios to inject
scenarios_folder_path: "{{ lookup('env', 'SCENARIOS_FOLDER_PATH')|default('CI/scenarios/', true) }}"
scenarios: "{{ lookup('env', 'SCENARIOS')|default('[[scenarios/etcd.yml, scenarios/post_action_etcd_example.sh], [scenarios/openshift-apiserver.yml, scenarios/post_action_openshift-kube-apiserver.yml], [scenarios/openshift-kube-apiserver.yml, scenarios/post_action_openshift-apiserver.yml], [scenarios/regex_openshift_pod_kill.yml, scenarios/post_action_regex.py]]', true) }}"
node_scenarios: "{{ lookup('env', 'NODE_SCENARIOS')|default('[scenarios/node_scenarios_example.yml]', true) }}"
cluster_shut_down_scenario: "{{ lookup('env', 'CLUSTER_SHUT_DOWN_SCENARIO')|default('[scenarios/cluster_shut_down_scenario.yml]', true) }}"

exit_on_failure: "{{ lookup('env', 'EXIT_ON_FAILURE')|default(false, true) }}"

Expand Down