litmuschaos / litmus

Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
https://litmuschaos.io
Apache License 2.0
4.45k stars 698 forks source link

Provide more configurable options when set up "Target Application" #4108

Closed cycwll closed 1 year ago

cycwll commented 1 year ago

Question

Can more configurable options be added when selecting Target Application. For example:

  1. Selecting all pods (currently only one pod has been randomly selected based on the label).
  2. Setting a fixed number of pods (scenario: A deployment has 10 replicates, select 5 of them).
  3. Or according to the proportion of pod quantity, such as selecting 50% pod.

Thanks in advance.

cycwll commented 1 year ago

I have found that the requirements I want can be achieved through a combination of multiple configurations.

nikita-nikolaev-htec commented 1 year ago

Hi @cycwll , I think all of that is currently possible. When, you create a new scenario, stage 3 - Tune Chaos Experiment, you can define % of pods using variable PODS_AFFECTED_PERC or select exact pods with TARGET_PODS variable. Check out full list of variables by task here, under experiment tunables tab- https://litmuschaos.github.io/litmus/experiments/categories/pods/pod-delete/#experiment-tunables