mirror of
https://github.com/containous/traefik.git
synced 2024-12-24 21:34:39 +03:00
28 lines
992 B
Cheetah
28 lines
992 B
Cheetah
[backends]{{range $serviceName, $instances := .Services}}
|
|
[backends.backend-{{ $serviceName }}.loadbalancer]
|
|
sticky = {{ getLoadBalancerSticky $instances}}
|
|
method = "{{ getLoadBalancerMethod $instances}}"
|
|
|
|
{{range $index, $i := $instances}}
|
|
[backends.backend-{{ $i.Name }}.servers.server-{{ $i.Name }}{{ $i.ID }}]
|
|
url = "{{ $i.Protocol }}://{{ $i.Host }}:{{ $i.Port }}"
|
|
weight = {{ $i.Weight }}
|
|
{{end}}
|
|
{{end}}
|
|
|
|
[frontends]{{range $serviceName, $instances := .Services}}
|
|
{{range filterFrontends $instances}}
|
|
[frontends.frontend-{{ $serviceName }}]
|
|
backend = "backend-{{ $serviceName }}"
|
|
passHostHeader = {{ .PassHostHeader }}
|
|
priority = {{ .Priority }}
|
|
entryPoints = [{{range .EntryPoints }}
|
|
"{{.}}",
|
|
{{end}}]
|
|
basicAuth = [{{range getBasicAuth .}}
|
|
"{{.}}",
|
|
{{end}}]
|
|
[frontends.frontend-{{ $serviceName }}.routes.route-frontend-{{ $serviceName }}]
|
|
rule = "{{getFrontendRule .}}"
|
|
{{end}}
|
|
{{end}} |