28 lines
No EOL
1,012 B
Cheetah
28 lines
No EOL
1,012 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 = "{{ getProtocol $i }}://{{ getHost $i }}:{{ getPort $i }}"
|
|
weight = {{ getWeight $i}}
|
|
{{end}}
|
|
{{end}}
|
|
|
|
[frontends]{{range $serviceName, $instances := .Services}}
|
|
{{range filterFrontends $instances}}
|
|
[frontends.frontend-{{ $serviceName }}]
|
|
backend = "backend-{{ $serviceName }}"
|
|
passHostHeader = {{ getPassHostHeader .}}
|
|
priority = {{ getPriority .}}
|
|
entryPoints = [{{range getEntryPoints .}}
|
|
"{{.}}",
|
|
{{end}}]
|
|
basicAuth = [{{range getBasicAuth .}}
|
|
"{{.}}",
|
|
{{end}}]
|
|
[frontends.frontend-{{ $serviceName }}.routes.route-frontend-{{ $serviceName }}]
|
|
rule = "{{getFrontendRule .}}"
|
|
{{end}}
|
|
{{end}} |