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.39k stars 688 forks source link

Probe Reusability #4853

Open ggolub opened 1 month ago

ggolub commented 1 month ago

Would like the ability to make probes more generic and also portable. This involves two things

  1. Ability to export/import probes as .yaml, much like you can do with the experiments.
  2. Capability to use templates. For example, We have numerous http probes with the same health check. The only difference is the internal DNS for each. Would be helpful not to have to redefine the "same" probe over and over again. Instead, some template placeholder could be useful.
rogeriofbrito commented 2 weeks ago

As for the first item, currently the probe definition is loaded to ChaosEngine yaml template at the time of experiment is triggered. I think that the probe part of ChaosEngine could already be placed at the moment the experiment is saved and a new revision is created. In this way, the probe would be part of the entire experiment yaml and there would not be no need to load the probe details when experiment is triggered.

ggolub commented 2 weeks ago

That doesn't address the need for export/import. If I have multiple installations of LitmusChaos I need a way to migrate the probes between them. Currently cannot do so. In addition, if I use HTTP probes that are slightly different, it would be fare more efficient to create my probe, export it, tweak the .json/.yaml, and import it rather than repeat the creation numerous times.