mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-06-30 22:05:46 +00:00
feat: Add support for HTTP load balancing between the proxy and upstream server groups (#2173)
Add initial tests Newlines Remove unused variable Co-authored-by: Richard Hansen <rhansen@rhansen.org> Change comment value Co-authored-by: Richard Hansen <rhansen@rhansen.org> add missing services line Co-authored-by: Richard Hansen <rhansen@rhansen.org> Use deploy.replicas Remove details about choosing a load balancing method Feedback note Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
This commit is contained in:
@ -219,6 +219,11 @@
|
||||
{{- define "upstream" }}
|
||||
upstream {{ .Upstream }} {
|
||||
{{- $server_found := false }}
|
||||
{{- $loadbalance := first (keys (groupByLabel .Containers "com.github.nginx-proxy.nginx-proxy.loadbalance")) }}
|
||||
{{- if $loadbalance }}
|
||||
# From the container's loadbalance label:
|
||||
{{ $loadbalance }}
|
||||
{{- end }}
|
||||
{{- range $container := .Containers }}
|
||||
# Container: {{ $container.Name }}
|
||||
{{- $args := dict "globals" $.globals "container" $container }}
|
||||
|
Reference in New Issue
Block a user