Haproxy dynamic configuration (confd) for Rancher. From rawmind/rancher-tools.
docker build -t interlegis/rancher-haproxy:<version> .
This image has to be run as a sidekick of rawmind/alpine-haproxy, making available /opt/tools volume. It scans rancher-metadata for a services that has haproxy labels, and generates haproxy frontend and backends to expose the services in TCP mode, supporting SSL/TLS pass-through and hostnames via SNI.
Haproxy labels, has to be created in your service, in order to get included in haproxy dynamic config.
- haproxy.enable = true # Enable or not haproxy publication
- haproxy.publish = < domain.name >:< port > # Domain and port to publish. Multiple domains separated by ","
WARNING: Only services with healthy state are added to haproxy, so health checks are mandatory.