Skip to content

AbdelrhmanHamouda/locust-k8s-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

192 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/


v2.0 - Complete Go Rewrite

The operator has been completely rewritten in Go, bringing significant improvements:

Improvement Before (Java) After (Go)
Memory ~256MB ~64MB
Startup ~60s <1s
Framework Java Operator SDK Operator SDK / controller-runtime

New Features in v2.0

  • Native OpenTelemetry - Export traces and metrics directly with --otel flag
  • Secret & ConfigMap Injection - Securely inject credentials as env vars or file mounts
  • Volume Mounting - Mount PVCs, ConfigMaps, Secrets with target filtering (master/worker/both)
  • Separate Resource Specs - Independent resource configuration for master and worker pods
  • Enhanced Status - Phase tracking, conditions, and worker connection status

Migration Guide for existing v1 users


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.

Documentation

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

Quick Start

Prerequisites

  • Go 1.24+ for local development
  • Docker for building container images
  • kubectl configured for your cluster
  • Helm 3.x for chart installation
  • Kind (optional, for local E2E testing)

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/

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).