Skip to content

labring/labring-envoy-ingress-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Labring Envoy Ingress Controller

A high-performance Kubernetes ingress controller using Envoy as the data plane, designed for handling large-scale ingress configurations with minimal latency.

Features

  • Fast ingress rule application (<5s with 100k+ rules)
  • Efficient resource utilization
  • High stability with multiple replica support
  • Envoy-based data plane with xDS protocol
  • Optimized for large-scale deployments

Building the Project

Prerequisites

  • Go 1.21 or later
  • Docker
  • Kubernetes cluster (v1.24+)

Build Steps

  1. Clone the repository:
git clone https://github.com/labring/labring-envoy-ingress-controller.git
cd labring-envoy-ingress-controller
  1. Build the controller binary:
go mod download
go build -o bin/controller cmd/controller/main.go
  1. Build the Docker image:
docker build -t labring/envoy-ingress-controller:latest .

Running the Controller

  1. Deploy the controller to your Kubernetes cluster:
kubectl apply -f deployments/deployment.yaml
  1. Verify the deployment:
kubectl get pods -n kube-system -l app=envoy-ingress-controller
  1. Check controller logs:
kubectl logs -n kube-system -l app=envoy-ingress-controller

Functional Testing

  1. Deploy a test application:
# Deploy test application
kubectl create deployment web --image=nginx
kubectl expose deployment web --port=80

# Create test ingress
kubectl create ingress web-ingress --rule="example.com/*=web:80"
  1. Verify ingress configuration:
# Check ingress status
kubectl get ingress web-ingress

# Test access (update hostname as needed)
curl -H "Host: example.com" http://<ingress-ip>/

Performance Testing

The project includes tools for performance testing under test/performance/:

  1. Generate test ingress rules:
# Build the test tool
go build -o bin/generate-ingress test/performance/generate_ingress.go

# Generate 100,000 ingress rules across 100 namespaces
./bin/generate-ingress -count 100000 -namespaces 100
  1. Measure ingress application latency:
# Run latency test
./test/performance/measure_latency.sh
  1. Monitor resource usage:
# Check controller resource usage
kubectl top pod -n kube-system -l app=envoy-ingress-controller

Performance Test Results

The controller is designed to:

  • Apply new ingress rules within 5 seconds even with 100,000+ existing rules
  • Maintain low resource usage under high load
  • Support multiple replicas for high availability

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published