ChaosResult resource holds the results of a ChaosExperiment with a namespace scope. It is created or updated at runtime by the experiment itself. It holds important information like the ChaosEngine reference, Experiment State, Verdict of the experiment (on completion), salient application/result attributes. It is also a source for metrics collection. It is updated/patched with the status of the experiment run. It is not removed as part of the default cleanup procedures to allow for extended reference.
Prerequisites​
To understand the concept of ChaosResult, make sure you have good knowledge of the ChaosEngine CR and
Chaos Scenario.
ChaosResult Spec​
This section describes the fields/details provided by the ChaosResult spec.
Component Details​
| Field | .spec.engine | 
|---|
| Description | Flag to hold the ChaosEngine name for the experiment | 
|---|
| Type | Optional | 
|---|
| Range | n/a  (type: string) | 
|---|
| Notes | The .spec.engineholds the engine name for the current course of the experiment. | 
|---|
| Field | .spec.experiment | 
|---|
| Description | Flag to hold the ChaosExperiment name which induces chaos. | 
|---|
| Type | Optional | 
|---|
| Range | n/a (type: string) | 
|---|
| Notes | The .spec.experimentholds the ChaosExperiment name for the current course of the experiment. | 
|---|
Status Details​
| Field | .status.experimentStatus.failstep | 
|---|
| Description | Flag to show the failure step of the ChaosExperiment | 
|---|
| Type | Mandatory | 
|---|
| Range | n/a(type: string) | 
|---|
| Notes | The .status.experimentStatus.failstepShow the step at which the experiment failed. It helps in faster debugging of failures in the experiment execution. | 
|---|
| Field | .status.experimentStatus.phase | 
|---|
| Description | Flag to show the current phase of the experiment | 
|---|
| Type | Mandatory | 
|---|
| Range | Awaited,Running,Completed,Aborted (type: string) | 
|---|
| Notes | The .status.experimentStatus.phaseshows the current phase in which the experiment is. It gets updated as the experiment proceeds.If the experiment is aborted then the status will be Aborted. | 
|---|
| Field | .status.experimentStatus.probesuccesspercentage | 
|---|
| Description | Flag to show the probe success percentage | 
|---|
| Type | Mandatory | 
|---|
| Range | 1 to 100 (type: int) | 
|---|
| Notes | The .status.experimentStatus.probesuccesspercentageshows the probe success percentage which is a ratio of successful checks v/s total probes. | 
|---|
| Field | .status.experimentStatus.verdict | 
|---|
| Description | Flag to show the verdict of the experiment. | 
|---|
| Type | Mandatory | 
|---|
| Range | Awaited,Pass,Fail,Stopped (type: string) | 
|---|
| Notes | The .status.experimentStatus.verdictshows the verdict of the experiment. It isAwaitedwhen the experiment is in progress and ends up with Pass or Fail according to the experiment result. | 
|---|
| Field | .status.history.passedRuns | 
|---|
| Description | It contains cumulative passed run count | 
|---|
| Type | Mandatory | 
|---|
| Range | ANY NON NEGATIVE INTEGER | 
|---|
| Notes | The .status.history.passedRunscontains cumulative passed run counts for a specific ChaosResult. | 
|---|
| Field | .status.history.failedRuns | 
|---|
| Description | It contains cumulative failed run count | 
|---|
| Type | Mandatory | 
|---|
| Range | ANY NON NEGATIVE INTEGER | 
|---|
| Notes | The .status.history.failedRunscontains cumulative failed run counts for a specific ChaosResult. | 
|---|
| Field | .status.history.stoppedRuns | 
|---|
| Description | It contains cumulative stopped run count | 
|---|
| Type | Mandatory | 
|---|
| Range | ANY NON NEGATIVE INTEGER | 
|---|
| Notes | The .status.history.stoppedRunscontains cumulative stopped run counts for a specific ChaosResult. | 
|---|
Probe Details​
| Field | .status.probestatus.name | 
|---|
| Description | Flag to show the name of probe used in the experiment | 
|---|
| Type | Mandatory | 
|---|
| Range | n/a n/a (type: string) | 
|---|
| Notes | The .status.probestatus.nameshows the name of the probe used in the experiment. | 
|---|
| Field | .status.probestatus.status.continuous | 
|---|
| Description | Flag to show the result of probe in continuous mode | 
|---|
| Type | Optional | 
|---|
| Range | Awaited,Passed,Better Luck Next Time (type: string) | 
|---|
| Notes | The .status.probestatus.status.continuoushelps to get the result of the probe in the continuous mode. The httpProbe is better used in the Continuous mode. | 
|---|
| Field | .status.probestatus.status.postchaos | 
|---|
| Description | Flag to show the probe result post chaos | 
|---|
| Type | Optional | 
|---|
| Range | Awaited,Passed,Better Luck Next Time (type:map[string]string) | 
|---|
| Notes | The .status.probestatus.status.postchaosshows the result of probe setup in EOT mode executed at the End of Test as a post-chaos check. | 
|---|
| Field | .status.probestatus.status.prechaos | 
|---|
| Description | Flag to show the probe result pre chaos | 
|---|
| Range | Awaited,Passed,Better Luck Next Time (type:string) | 
|---|
| Notes | The .status.probestatus.status.prechaosshows the result of probe setup in SOT mode executed at the Start of Test as a pre-chaos check. | 
|---|
| Field | .status.probestatus.type | 
|---|
| Description | Flag to show the type of probe used | 
|---|
| Range | HTTPProbe,K8sProbe,CmdProbe(type:string) | 
|---|
| Notes | The .status.probestatus.typeshows the type of probe used. | 
|---|
Summary​
Just like the ChaosExperiment CR and ChaosEngine CR, ChaosResult is a Custom Resource provided by Litmus.
ChaosResult resource holds the results of a ChaosExperiment. It comprises of some important information related to the experiment execution like Experiment Details, Verdict, Phase, ProbeSuccessPercentage etc. It is updated/patched with every experiment run. It can also be used as a source for matrics collection.
Learn More​