forked from Ivasoft/traefik
feat: use parser to load dynamic config from file.
This commit is contained in:
committed by
GitHub
parent
7affeae480
commit
cb1d0441e9
@@ -1,5 +1,5 @@
|
||||
[http.routers]
|
||||
|
||||
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
[tcp.services.applicationtcp-1.loadBalancer]
|
||||
[[tcp.services.applicationtcp-1.loadBalancer.servers]]
|
||||
url = "http://172.17.0.9:80"
|
||||
address = "http://172.17.0.9:80"
|
||||
|
||||
[udp.routers]
|
||||
|
||||
@@ -77,4 +77,4 @@
|
||||
|
||||
[udp.services.applicationudp-1.loadBalancer]
|
||||
[[udp.services.applicationudp-1.loadBalancer.servers]]
|
||||
url = "http://172.17.0.10:80"
|
||||
address = "http://172.17.0.10:80"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[http.services]
|
||||
{{ range $i, $e := until 20 }}
|
||||
[http.services.application-{{ $e }}]
|
||||
[[http.services.application-{{ $e }}.servers]]
|
||||
url="http://127.0.0.1"
|
||||
[http.services.application-{{ $e }}.loadBalancer]
|
||||
[[http.services.application-{{ $e }}.loadBalancer.servers]]
|
||||
url = "http://127.0.0.1"
|
||||
{{ end }}
|
||||
@@ -1,6 +1,6 @@
|
||||
http:
|
||||
{{ range $i, $e := until 20 }}
|
||||
routers:
|
||||
{{ range $i, $e := until 20 }}
|
||||
router{{ $e }}:
|
||||
service: application-1
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user