Skip to content

Bug: Advanced Options tolerations serialized as object instead of array in ChaosEngine, save fails with "failed to unmarshal chaosengine" #5564

Description

@a-sotnikov

What happened:

When configuring tolerations via Advanced Options in the ChaosCenter UI (Kubernetes chaos scenario), saving the experiment fails with failed to unmarshal chaosengine.

Inspecting the generated workflow YAML shows that tolerations under ChaosEngine.spec.components.runner and ChaosEngine.spec.experiments[].spec.components are written as a single object instead of an array, which does not match the Kubernetes / chaos-operator API schema.

Incorrect (generated by UI):

tolerations:
  effect: NoExecute
  key: dedicated
  operator: Equal
  value: my-node-tag

What you expected to happen:
Scenario saves successfully. The ChaosEngine manifest contains tolerations as an array under ChaosEngine.spec.components.runner and ChaosEngine.spec.experiments[].spec.components.

Correct syntax:

tolerations:
  - effect: NoExecute
    key: dedicated
    operator: Equal
    value: my-node-tag

Where can this issue be corrected? (optional)

chaoscenter/web — ChaosCenter frontend (experiment Advanced Options → ChaosEngine YAML generation)

Primary fix:

Related type fixes:

How to reproduce it (as minimally and precisely as possible):

  1. Open ChaosCenter → create or edit a Kubernetes chaos scenario with at least one fault (e.g. pod-http-status-code).
  2. Open Advanced Options for the fault.
  3. Enable Tolerations and set values, for example:
    • key: dedicated
    • value: my-node-tag
    • effect: NoExecute
    • operator: Equal
  4. Click Save.
    As a result, save fails with "failed to unmarshal chaosengine".

Verify in YAML (optional): Export or inspect the workflow manifest. At Workflow.spec tolerations are correct (array):

tolerations:
  - effect: NoExecute
    key: dedicated
    ...

But in the ChaosEngine artifact they are wrong (object):

spec:
  experiments:
    - spec:
        components:
          tolerations:
            effect: NoExecute   # should be a list item under `-`
            key: dedicated

Anything else we need to know?:
Workaround: After adding tolerations in Advanced Options, edit the generated YAML manually to use the correct array syntax.
Environment: Litmus 3.30.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions