From 6c8009c0497f9ea54bf5194bf8cae7c2e4a0c313 Mon Sep 17 00:00:00 2001 From: Rich Tibbett Date: Fri, 24 Mar 2017 17:45:18 +0100 Subject: [PATCH] Do not bind upstream with 'ingress' network that is given to all nodes in swarm mode --- nginx.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index a5b1d32..369711c 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -108,7 +108,7 @@ upstream {{ $upstream_name }} { {{ range $knownNetwork := $CurrentContainer.Networks }} {{ range $containerNetwork := $container.Networks }} - {{ if eq $knownNetwork.Name $containerNetwork.Name }} + {{ if (and (ne $containerNetwork.Name "ingress") (eq $knownNetwork.Name $containerNetwork.Name)) }} ## Can be connect with "{{ $containerNetwork.Name }}" network {{/* If only 1 port exposed, use that */}}