From 5837e2af492214e88a0a4c9988d719b9dd5a9b1f Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Fri, 15 Jun 2018 00:26:30 -0400 Subject: [PATCH] Add support for IPV6 in stream upstream servers --- rootfs/etc/nginx/template/nginx.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index 1b8bdc9040..563982b31b 100644 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -607,7 +607,7 @@ stream { {{ range $i, $tcpServer := .TCPBackends }} upstream tcp-{{ $tcpServer.Port }}-{{ $tcpServer.Backend.Namespace }}-{{ $tcpServer.Backend.Name }}-{{ $tcpServer.Backend.Port }} { {{ range $j, $endpoint := $tcpServer.Endpoints }} - server {{ $endpoint.Address }}:{{ $endpoint.Port }}; + server {{ $endpoint.Address | formatIP }}:{{ $endpoint.Port }}; {{ end }} } server { @@ -636,7 +636,7 @@ stream { {{ range $i, $udpServer := .UDPBackends }} upstream udp-{{ $udpServer.Port }}-{{ $udpServer.Backend.Namespace }}-{{ $udpServer.Backend.Name }}-{{ $udpServer.Backend.Port }} { {{ range $j, $endpoint := $udpServer.Endpoints }} - server {{ $endpoint.Address }}:{{ $endpoint.Port }}; + server {{ $endpoint.Address | formatIP }}:{{ $endpoint.Port }}; {{ end }} }