Visitar URL original
GitHub - AbdelrhmanHamouda/locust-k8s-operator: Locust Kubernetes operator: run distributed Locust load tests on Kubernetes with a LocustTest CRD. Helm chart, OpenTelemetry, OpenShift support. · GitHub
Skip to content

About

Locust Kubernetes operator: run distributed Locust load tests on Kubernetes with a LocustTest CRD. Helm chart, OpenTelemetry, OpenShift support.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

93 stars

Watchers

3 watching

Forks

Latest commit

 

History

249 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Locust Kubernetes Operator Logo

Locust Kubernetes Operator

Enable performance testing for the modern era!

Utilize the full power of Locust in the cloud.

Docs: github.io/locust-k8s-operator/


CI Pipeline Security Scan Codacy Badge Codacy Badge Documentation Docker Pulls

At a Glance

The Operator is designed to unlock seamless and effortless distributed performance testing in the cloud and enable continuous integration for CI/CD. By design, the entire system is cloud native and focuses on automation and CI practices. One strong feature about the system is its ability to horizontally scale to meet any required performance demands.

You describe a load test as a LocustTest custom resource. The operator creates the master and worker pods, wires them together, streams the results wherever you point them, and cleans everything up when the run finishes.

What You Get

Observability. Export traces and metrics straight out of Locust with native OpenTelemetry, no sidecar involved. Prometheus scraping works out of the box for setups that aren't on OTLP yet.

Control over placement. Node affinity, taint tolerations, node selectors, and runtimeClassName for sandboxed runtimes such as gVisor or Kata Containers. Master and worker pods take independent resource specs, and CPU limits can be lifted entirely for latency-sensitive runs.

Everything your test needs at runtime. Inject credentials from Secrets and ConfigMaps as environment variables or file mounts. Mount test data and certificates from PVCs, ConfigMaps, or Secrets, targeted at the master, the workers, or both. Private registries are supported through imagePullSecrets.

Kafka and AWS MSK integration for testing event-driven systems, with authentication handled for you.

Tests run in isolation, so you can run many at once without cross-interference, and a configurable TTL tears down resources once a run is done. The features page covers the full list.

Documentation

All documentation for this project is available at github.io/locust-k8s-operator/.

Quick Start

Prerequisites

Kubernetes 1.29 or newer, and Helm 3.x to install the chart.

For local development you'll also want Go 1.26+, Docker for building images, kubectl pointed at your cluster, and Kind if you plan to run the E2E suite.

Installation

Install the operator using Helm:

helm repo add locust-k8s-operator https://abdelrhmanhamouda.github.io/locust-k8s-operator
helm install locust-operator locust-k8s-operator/locust-k8s-operator

Or from the repository:

helm install locust-operator charts/locust-k8s-operator/

Already running locust.io/v1 resources? They keep working through the conversion webhook, and the migration guide walks through moving to v2. The v1 API is deprecated and slated for removal in v3.

Development

# Install CRDs
make install

# Run operator locally (against configured cluster)
make run

# Run tests
make test

# Run E2E tests (requires Kind)
make test-e2e

# Build and push operator image
make docker-build docker-push IMG=<your-registry>/locust-operator:tag

See CONTRIBUTING.md for detailed development setup.

Project Status

The project is actively maintained and under continuous development and improvement. If you have any request or want to chat, kindly open a ticket. If you wish to contribute code and/or ideas, kindly check the contribution section.

Contribute

There's plenty to do, come say hi in the issues!

Also check out CONTRIBUTING.md.

License

Open source licensed under Apache-2.0 license (see LICENSE file for details).

About

Locust Kubernetes operator: run distributed Locust load tests on Kubernetes with a LocustTest CRD. Helm chart, OpenTelemetry, OpenShift support.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

93 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages