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