> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/internal-developer-portal/use-idp/plugins/available-plugins/harness-native-plugins/harness-chaos.md).

# Harness Chaos Engineering

View list of Chaos Experiments for your applications.

| Plugin details |                                                        |
| -------------- | ------------------------------------------------------ |
| **Created by** | Harness                                                |
| **Category**   | Chaos Engineering                                      |
| **Source**     | [GitHub](https://github.com/harness/backstage-plugins) |
| **Type**       | Open-source plugin                                     |

## Configuration <a href="#configuration" id="configuration"></a>

### Application configuration YAML <a href="#application-configuration-yaml" id="application-configuration-yaml"></a>

*No action required*

This plugin requires a backend proxy configuration to make calls to Harness APIs with authentication. The following configuration is set by default and you do not need to change anything:

```yaml
proxy:
  "/harness/prod":
    target: "https://app.harness.io/"
    pathRewrite:
      "/api/proxy/harness/prod/?": "/"
    allowedHeaders:
      - authorization
```

### Secrets <a href="#secrets" id="secrets"></a>

No secrets are required for this plugin because both IDP and Chaos Engineering are part of the Harness software delivery platform.

### Delegate proxy <a href="#delegate-proxy" id="delegate-proxy"></a>

*No action required*

This plugin does not require a delegate proxy to be set up.

***

## Layout <a href="#layout" id="layout"></a>

*No action required*

This plugin exports a UI tab that you can use as a new "Chaos Experiments" tab for Chaos Engineering Experiments or for any other layout page. The following configuration is set by default in **Layout** under **Configure** for **Service** and you do not need to change anything:

```yaml
- name: chaos
  path: /chaos
  title: Chaos Experiments
  contents:
    - component: EntityHarnessChaosContent
```

Also, you could add a conditional like `isHarnessChaosAvailable` which is met when `harness.io/project-url` and `harness.io/network-map-tags` annotations are present in the software component's `catalog-info.yaml` definition file.

```yaml
- name: chaos
  path: /chaos
  title: Chaos Experiments
  contents:
    - component: EntitySwitch
      specs:
        cases:
          - if: isHarnessChaosAvailable
            content:
              component: EntityHarnessChaosContent
```

![Chaos Experiments tab showing name, infra, resilience score, recent runs, and report columns](https://1305598861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1bzrz9ybUGCcYdvS4u0z%2Fuploads%2Fgit-blob-038b92dd1d1aa09e7d05124766dd96e0c169dd88%2Fharness-chaos-tab.png?alt=media)

***

## Annotations <a href="#annotations" id="annotations"></a>

To configure the plugin for a service in the software catalog, set one or both of the following annotations in its `catalog-info.yaml` definition file.

```yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  # ...
  annotations:
    harness.io/project-url: <harness_project_url>
    harness.io/network-map-tags: |
      <nm-name_1>: <nm-label_1>
      <nm-name_2>: <nm-label_2>
spec:
  type: service
  # ...
```

The plugin loads Chaos experiments from the Harness project linked by `harness.io/project-url`. On that entity's **Chaos Experiments** tab, it shows the experiments that match the entity.

### Tag chaos experiments

Tag each Chaos experiment as `<type>=<identifier>`, where:

* `<type>` is the type of the matching IDP entity
* `<identifier>` is the identifier of the matching IDP entity

For a catalog entity with `spec.type: service` and identifier `emailservice`, tag the Chaos experiment `service=emailservice`. The **Chaos Experiments** tab for that entity then lists experiments that carry this tag in the linked project.

### Entity-level resilience score

The score at the top of the tab is the average of the latest-run resilience scores for experiments that have a score. It appears as a percentage and a fraction `p/q`, where:

* `p` is the number of experiments that have a score
* `q` is the total number of linked experiments

For example, if three linked experiments have latest-run scores of `100`, `100`, and `100`, and ten have no score yet (`N/A`), the tab shows **100%** with **3/13**.

### Experiments table columns

The experiments table includes these columns:

* **Name:** The Chaos experiment name.
* **Infra:** The infrastructure the experiment runs against.
* **Resilience score:** The score from the latest run of each experiment.
* **Recent experiment runs:** A timeline of recent run outcomes for the experiment.
* **Report:** A link to the report for the latest run of each experiment.
* **Last updated by:** Who last updated the experiment, and when.

***

## Support <a href="#support" id="support"></a>

The plugin is owned by Harness and managed in the [Harness plugins repository](https://github.com/harness/backstage-plugins) as an open-source project. Create a GitHub issue to report bugs or suggest new features for the plugin.

{% @harness-feedback/feedback %}
