Skip to content

Commit c489591

Browse files
committed
Adjust spacing in upstreams template
1 parent b8a28a6 commit c489591

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

internal/mode/static/nginx/config/upstreams_template.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ package config
55
// NGINX Plus needs 1m to support roughly the same amount of http servers (556 upstream servers).
66
// For stream upstream servers, 512k will support 576 in OSS and 1m will support 991 in NGINX Plus
77
// https://github.com/nginxinc/nginx-gateway-fabric/issues/483
8+
//
9+
// if the keepalive directive is present, it is necessary to activate the load balancing method before the directive.
810
const upstreamsTemplateText = `
911
{{ range $u := . }}
1012
upstream {{ $u.Name }} {
11-
# if the keepalive directive us present, it is necessary to activate the load balancing method before the directive
1213
random two least_conn;
1314
{{ if $u.ZoneSize -}}
1415
zone {{ $u.Name }} {{ $u.ZoneSize }};
15-
{{ end -}}
16+
{{- end }}
1617
{{ range $server := $u.Servers }}
1718
server {{ $server.Address }};
1819
{{- end }}
@@ -38,7 +39,7 @@ upstream {{ $u.Name }} {
3839
random two least_conn;
3940
{{ if $u.ZoneSize -}}
4041
zone {{ $u.Name }} {{ $u.ZoneSize }};
41-
{{ end -}}
42+
{{- end }}
4243
{{ range $server := $u.Servers }}
4344
server {{ $server.Address }};
4445
{{- end }}

0 commit comments

Comments
 (0)