- Enhanced Cloudflare Plugin with `use_builtin_ips` option to automatically use and update built-in IP ranges. - Updated Cloudflare IP restoration logic, including metadata and HAProxy config generation. - Reorganized plugin documentation with sidebar positions for improved accessibility. - Extended Cloudflare documentation to detail built-in IP ranges, examples, and configurations. - Added new test cases to validate `use_builtin_ips` functionality and file handling. |
||
|---|---|---|
| .github | ||
| .run | ||
| .vscode | ||
| build | ||
| deploy | ||
| docs | ||
| examples | ||
| helm/easyhaproxy | ||
| src | ||
| .dockerignore | ||
| .gitignore | ||
| .gitpod.yml | ||
| build-multiarch.sh | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| setup.py | ||
EasyHAProxy
Service discovery for HAProxy
EasyHAProxy dynamically creates the haproxy.cfg based on metadata collected from your workloads (Docker labels, Swarm service labels, or Kubernetes ingress annotations).
EasyHAProxy can detect and configure HAProxy automatically on the following platforms:
- Docker
- Docker Swarm
- Kubernetes
- Static YAML definitions (
EASYHAPROXY_DISCOVER=static)
Who is using?
EasyHAProxy is part of some projects:
- Dokku
- MicroK8s
- DigitalOcean Marketplace
See detailed instructions on how to install below.
EasyHAProxy Mission
Easy to set up and low configuration to numerous features.
Features
EasyHAProxy will discover services based on Docker (or Swarm) labels and Kubernetes ingress annotations, then dynamically build the haproxy.cfg. Below, EasyHAProxy main features:
- Support Automatic Certificate Management Environment (ACME) protocol compatible with Let's Encrypt and other CAs.
- Set your custom SSL certificates
- Balance traffic between multiple replicas
- Set SSL policies (
strict,default,loose) viaEASYHAPROXY_SSL_MODE. - Set up HAProxy to listen to TCP.
- Add redirects.
- Enable/disable Stats on port 1936 with a custom password.
- Enable/disable custom errors.
Also, it is possible to set up HAProxy from a simple Yaml file instead of creating haproxy.cfg file.
How Does It Work?
You don't need to change your current infrastructure and don't need to learn the HAProxy configuration.
The steps are:
- Run the EasyHAProxy container;
- Add some labels to the containers you want to be parsed by EasyHAProxy (see detailed instructions below);
- EasyHAProxy will automatically detect the containers, set up, and reload the HAProxy configurations for you without downtime.
Detailed Instructions
For detailed instructions on how to use EasyHAProxy, follow the instructions for the platform you want to use:
Or you can install using tools:
Special Topics
If you already set up the EasyHAProxy, is time to go deeper:
- Custom SSL
- Automatic Certificate Issuing (e.g. Letsencrypt)
Configuration Reference
Detailed configuration guides for advanced setups:
- Container Labels - Configure Docker/Swarm containers with labels
- Environment Variables - Configure EasyHAProxy behavior
- Volumes - Map volumes for certificates, config, and custom files
- Plugins - Extend HAProxy with plugins (Development Guide)
- Cloudflare - Restore visitor IP from Cloudflare CDN
- Cleanup - Automatic cleanup of temporary files
- Deny Pages - Block access to specific paths
- IP Whitelist - Restrict access to IPs/CIDR ranges
- JWT Validator - JWT authentication validation
- FastCGI - PHP-FPM and FastCGI application support
- Other Configurations - Additional configurations (ports, custom errors, etc.)
- Limitations - Important limitations and considerations
See EasyHAProxy in action
Click on the image to see the videos (use HD for better visualization)
Here is the code applied in the examples above.














