xk6-disruptor
xk6-disruptor copied to clipboard
Implement NodeDisruptor
Implement a disruptor for injecting faults in nodes of a Kubernetes cluster.
The disruptor should allow selecting/excluding nodes based on labels, taints (e.g. unschedulable
), and conditions (e.g. Ready
).
The disruptor will allow the injection of faults such as network traffic disruption (e.g. package drops) and resource depletion (e.g. CPU or memory consumption)
The following is a mock of the intended interface
const disruptor = new NodeDisruptor(
selector: {
labels: {
'topology.k8s.io/zone': "zone-a"
}
}
disruptor.stressResources(
{
cores: 2,
utilization: 1.0,
memory: "3Gb"
},
"1m"
)