Skip to content

Commit

Permalink
run_kraken
Browse files Browse the repository at this point in the history
  • Loading branch information
tsebastiani committed Jun 14, 2023
1 parent 9eec7fc commit 1ddb40b
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions run_kraken.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,31 +214,35 @@ def main(cfg):
chaos_telemetry.scenarios.extend(scenario_telemetries)

elif scenario_type == "plugin_scenarios":
failed_post_scenarios = plugins.run(
failed_post_scenarios, scenario_telemetries = plugins.run(
scenarios_list,
kubeconfig_path,
kraken_config,
failed_post_scenarios,
wait_duration,
telemetry
)
chaos_telemetry.scenarios.extend(scenario_telemetries)
# krkn_lib_kubernetes
elif scenario_type == "container_scenarios":
logging.info("Running container scenarios")
failed_post_scenarios = pod_scenarios.container_run(
failed_post_scenarios, scenario_telemetries = pod_scenarios.container_run(
kubeconfig_path,
scenarios_list,
config,
failed_post_scenarios,
wait_duration,
kubecli
kubecli,
telemetry
)
chaos_telemetry.scenarios.extend(scenario_telemetries)

# Inject node chaos scenarios specified in the config
# krkn_lib_kubernetes
elif scenario_type == "node_scenarios":
logging.info("Running node scenarios")
nodeaction.run(scenarios_list, config, wait_duration, kubecli)

scenario_telemetries = nodeaction.run(scenarios_list, config, wait_duration, kubecli, telemetry)
chaos_telemetry.scenarios.extend(scenario_telemetries)
# Inject managedcluster chaos scenarios specified in the config
# krkn_lib_kubernetes
elif scenario_type == "managedcluster_scenarios":
Expand All @@ -253,7 +257,8 @@ def main(cfg):
elif scenario_type == "time_scenarios":
if distribution == "openshift":
logging.info("Running time skew scenarios")
time_actions.run(scenarios_list, config, wait_duration, kubecli)
failed_post_scenarios, scenario_telemetries = time_actions.run(scenarios_list, config, wait_duration, kubecli, telemetry)
chaos_telemetry.scenarios.extend(scenario_telemetries)
else:
logging.error(
"Litmus scenarios are currently "
Expand Down Expand Up @@ -302,8 +307,9 @@ def main(cfg):

# Inject cluster shutdown scenarios
# krkn_lib_kubernetes
elif scenario_type == "cluster_shut_down_scenarios":
shut_down.run(scenarios_list, config, wait_duration, kubecli)
elif scenario_type == "cluster_shut_down_scenarios" :
failed_post_scenarios, scenario_telemetries = shut_down.run(scenarios_list, config, wait_duration, kubecli, telemetry)
chaos_telemetry.scenarios.extend(scenario_telemetries)

# Inject namespace chaos scenarios
# krkn_lib_kubernetes
Expand Down

0 comments on commit 1ddb40b

Please sign in to comment.