Common node fault tunables
These tunables apply to every node-level chaos fault in Harness Chaos Engineering. Set them on the fault in Chaos Studio to choose which nodes the experiment targets.
Target single node
Use the TARGET_NODE environment variable to name the single node the fault should run against.
| Tunable | Description | Default |
|---|---|---|
TARGET_NODE | Name of the node to target. | "" |
Supported by: Node drain, Node taint, Node restart, Kubelet service kill.
- name: TARGET_NODE
value: "node01"
Target multiple nodes
Use the TARGET_NODES environment variable to target a comma-separated list of nodes.
| Tunable | Description | Default |
|---|---|---|
TARGET_NODES | Comma-separated list of node names to target. | "" |
Supported by: Node CPU hog, Node memory hog, Node I/O stress, Node network loss, Node network latency.
- name: TARGET_NODES
value: "node01,node02"
Target nodes with labels
Use the NODE_LABEL environment variable to select target nodes by label. This is mutually exclusive with TARGET_NODE and TARGET_NODES. If both are set, the explicit node list wins.
| Tunable | Description | Default |
|---|---|---|
NODE_LABEL | Label selector in key=value form. The fault targets nodes whose labels match. | "" |
- name: NODE_LABEL
value: "kubernetes.io/role=worker"
Node affected percentage
Use the NODES_AFFECTED_PERCENTAGE environment variable to target a percentage of nodes that match the label selector. A value of 0 (the default) means one node.
| Tunable | Description | Default |
|---|---|---|
NODES_AFFECTED_PERCENTAGE | Percentage of nodes (matching the selector) to target. 0 means one node. | 0 |
Supported by: Node CPU hog, Node memory hog, Node I/O stress.
- name: NODES_AFFECTED_PERCENTAGE
value: "100"
- name: NODE_LABEL
value: "kubernetes.io/role=worker"