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

Extend schema validation on chaosengine to experiment ENV #1521

Open ksatchit opened 4 years ago

ksatchit commented 4 years ago

Right now we only validate (via OpenAPI v3 schema validation) the standard properties of the engine/experiment .spec. We need to extend validation (say, via the newly introduced validation webhook controller) to the experiment environment variables as well.

ksatchit commented 4 years ago

cc: @rahulchheda @ispeakc0de

rahulchheda commented 4 years ago

@ksatchit Will this be per experiment-based validation for mandatory ENV's? For example https://docs.litmuschaos.io/docs/container-kill/#supported-experiment-tunables

And do we want it to extend the logic, to validate the resource as well, for example: TARGET_CONTAINER should exist in the ...spec.containers[*].name as well? Or just for the existence of those ENV's?