diff --git a/mariadb/files/nginx.tmpl b/mariadb/files/nginx.tmpl index 5ec3d0db6d..356fad5025 100644 --- a/mariadb/files/nginx.tmpl +++ b/mariadb/files/nginx.tmpl @@ -473,11 +473,11 @@ stream { {{ range $j, $endpoint := $tcpServer.Endpoints }} {{ if eq $j 0 }} # NOTE(portdirect): see https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-health-check/#passive-tcp-health-checks to tune passive healthchecks - server {{ $endpoint.Address }}:{{ $endpoint.Port }}; + server {{ formatIP $endpoint.Address }}:{{ $endpoint.Port }}; {{ else if eq $j 1 }} - server {{ $endpoint.Address }}:{{ $endpoint.Port }} backup; + server {{ formatIP $endpoint.Address }}:{{ $endpoint.Port }} backup; {{ else }} - server {{ $endpoint.Address }}:{{ $endpoint.Port }} down; + server {{ formatIP $endpoint.Address }}:{{ $endpoint.Port }} down; {{ end }} {{ end }} }