How alexei-led/pumba works
Pumba is a CLI chaos-testing tool for Docker, containerd, and Podman. Users select a runtime, choose containers by name, pattern, labels, or random selection, and invoke lifecycle, execution, network, or stress actions; interval scheduling can repeat the action. Runtime adapters implement the shared container interface, while network and stress operations may use helper containers or direct execution. README documents the major capabilities and runtime behaviors; some implementation links for unsampled command families are therefore shown as documented rather than source-verified.
Main entry points: container/client.go Container interface · runtime.go Runtime selection · main.go Pumba entry · docker/client.go Docker adapter
Components 21
CLI and orchestration
- Pumba entry
cmd/main.go - Command registration
cmd/commands.go - Runtime selection
cmd/runtime.go - Command scheduling
pkg/chaos/command.go - Container selection
pkg/chaos/runner.go
Chaos actions
- Lifecycle actions
pkg/chaos/lifecycle - Container execution
pkg/chaos/lifecycle/exec.go - Network emulation
pkg/chaos/netem - Network targets
pkg/chaos/netem/target.go - Ingress packet loss
pkg/chaos/iptables - Resource stress
pkg/chaos/stress
Runtime adapters
- Docker adapter
pkg/runtime/docker/client.go - containerd adapter
pkg/runtime/containerd/client.go - Podman adapter
pkg/runtime/podman/client.go - Helper containers
pkg/runtime/docker/sidecar.go - containerd stress
pkg/runtime/containerd/stress_sidecar.go - Podman stress
pkg/runtime/podman/stress.go
Execution primitives
- Container interface
pkg/container/client.go - Container model
pkg/container/container.go - Traffic control
pkg/tc/netem.go
Other components
- CLI user
Connections 23
- CLI user → Pumba entry: invokes
README.md - Pumba entry → Command registration: registers commands
cmd/main.go - Pumba entry → Runtime selection: creates runtime
cmd/main.go - Command registration → Command scheduling: builds actions
cmd/commands.go - Runtime selection → Docker adapter: selects Docker
cmd/runtime.go - Runtime selection → containerd adapter: selects containerd
cmd/runtime.go - Runtime selection → Podman adapter: selects Podman
cmd/runtime.go - Command scheduling → Container selection: runs command
pkg/chaos/command.go - Container selection → Container interface: lists containers
pkg/chaos/runner.go - Lifecycle actions → Container interface: changes lifecycle
README.md - Container execution → Container interface: executes command
README.md - Network emulation → Network targets: resolves targets
pkg/chaos/netem/target.go - Network targets → Container interface: lists and resolves
pkg/chaos/netem/target.go - Network emulation → Traffic control: applies qdisc
README.md - Ingress packet loss → Container interface: applies packet loss
README.md - Resource stress → Container interface: stresses containers
README.md - Docker adapter → Container interface: implements interface
pkg/runtime/docker/client.go - containerd adapter → Container interface: implements interface
pkg/runtime/containerd/client.go - Podman adapter → Container interface: implements interface
pkg/runtime/podman/client.go - Docker adapter → Helper containers: runs sidecars
README.md - containerd adapter → containerd stress: supports stress
README.md - Podman adapter → Podman stress: supports stress
README.md - Container interface → Container model: uses container model