From 15e87db9c079402a50a501d43081b9269c4c2d01 Mon Sep 17 00:00:00 2001 From: Joao M Date: Wed, 17 Aug 2022 14:04:13 +0000 Subject: [PATCH] Fine tune adjusts --- README.md | 6 ++++++ assets/scripts/haproxy-reload.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 68c50ca..0e46df1 100644 --- a/README.md +++ b/README.md @@ -323,5 +323,11 @@ where ERROR_NUMBER is the http error code (e.g. 503.http) docker build -t byjg/easy-haproxy . ``` +## Limitations + +EasyHAProxy has some limitations when there is more than one easy-haproxy container running: +- Replicas can be out-of-sync for a few seconds, because each replica will discover the pods separatedly. +- Each replica will request a Letsencrypt certificate and it can fail because the letsencrypt challenge can be directed to the other replica. + ---- [Open source ByJG](http://opensource.byjg.com) diff --git a/assets/scripts/haproxy-reload.sh b/assets/scripts/haproxy-reload.sh index ee29cd0..1945cbc 100755 --- a/assets/scripts/haproxy-reload.sh +++ b/assets/scripts/haproxy-reload.sh @@ -16,7 +16,7 @@ else touch ${CONTROL_FILE} if [[ "$EASYHAPROXY_DISCOVER" == "docker" ]]; then - CONTAINERS=$(docker ps -q) + CONTAINERS=$(docker ps -q | sort | uniq) LABEL_PATH=".Config.Labels" for container in ${CONTAINERS}; do