Bind healthcheck to backend by entryPointName
This commit is contained in:
parent
7d3878214a
commit
ff11467022
4 changed files with 144 additions and 11 deletions
|
@ -0,0 +1,31 @@
|
|||
defaultEntryPoints = ["http1", "http2"]
|
||||
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http1]
|
||||
address = ":8000"
|
||||
[entryPoints.http2]
|
||||
address = ":9000"
|
||||
|
||||
[web]
|
||||
address = ":8080"
|
||||
|
||||
[file]
|
||||
[backends]
|
||||
[backends.backend1]
|
||||
[backends.backend1.LoadBalancer]
|
||||
method = "drr"
|
||||
[backends.backend1.healthcheck]
|
||||
path = "/health"
|
||||
interval = "1s"
|
||||
[backends.backend1.servers.server1]
|
||||
url = "http://{{.Server1}}:80"
|
||||
[backends.backend1.servers.server2]
|
||||
url = "http://{{.Server2}}:80"
|
||||
|
||||
[frontends]
|
||||
[frontends.frontend1]
|
||||
backend = "backend1"
|
||||
[frontends.frontend1.routes.test_1]
|
||||
rule = "Host:test.localhost"
|
|
@ -0,0 +1,31 @@
|
|||
defaultEntryPoints = ["http1", "http2"]
|
||||
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http1]
|
||||
address = ":8000"
|
||||
[entryPoints.http2]
|
||||
address = ":9000"
|
||||
|
||||
[web]
|
||||
address = ":8080"
|
||||
|
||||
[file]
|
||||
[backends]
|
||||
[backends.backend1]
|
||||
[backends.backend1.LoadBalancer]
|
||||
method = "wrr"
|
||||
[backends.backend1.healthcheck]
|
||||
path = "/health"
|
||||
interval = "1s"
|
||||
[backends.backend1.servers.server1]
|
||||
url = "http://{{.Server1}}:80"
|
||||
[backends.backend1.servers.server2]
|
||||
url = "http://{{.Server2}}:80"
|
||||
|
||||
[frontends]
|
||||
[frontends.frontend1]
|
||||
backend = "backend1"
|
||||
[frontends.frontend1.routes.test_1]
|
||||
rule = "Host:test.localhost"
|
Loading…
Add table
Add a link
Reference in a new issue