Add unhealthy Interval to the health check configuration
This commit is contained in:
parent
6c3b099c25
commit
d7d0017545
36 changed files with 701 additions and 295 deletions
|
|
@ -162,6 +162,7 @@ func TestDecodeConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service0.loadbalancer.healthcheck.headers.name1": "foobar",
|
||||
"traefik.http.services.Service0.loadbalancer.healthcheck.hostname": "foobar",
|
||||
"traefik.http.services.Service0.loadbalancer.healthcheck.interval": "1s",
|
||||
"traefik.http.services.Service0.loadbalancer.healthcheck.unhealthyinterval": "1s",
|
||||
"traefik.http.services.Service0.loadbalancer.healthcheck.path": "foobar",
|
||||
"traefik.http.services.Service0.loadbalancer.healthcheck.method": "foobar",
|
||||
"traefik.http.services.Service0.loadbalancer.healthcheck.status": "401",
|
||||
|
|
@ -186,6 +187,7 @@ func TestDecodeConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.healthcheck.headers.name1": "foobar",
|
||||
"traefik.http.services.Service1.loadbalancer.healthcheck.hostname": "foobar",
|
||||
"traefik.http.services.Service1.loadbalancer.healthcheck.interval": "1s",
|
||||
"traefik.http.services.Service1.loadbalancer.healthcheck.unhealthyinterval": "1s",
|
||||
"traefik.http.services.Service1.loadbalancer.healthcheck.path": "foobar",
|
||||
"traefik.http.services.Service1.loadbalancer.healthcheck.method": "foobar",
|
||||
"traefik.http.services.Service1.loadbalancer.healthcheck.status": "401",
|
||||
|
|
@ -701,15 +703,16 @@ func TestDecodeConfiguration(t *testing.T) {
|
|||
},
|
||||
},
|
||||
HealthCheck: &dynamic.ServerHealthCheck{
|
||||
Scheme: "foobar",
|
||||
Mode: "foobar",
|
||||
Path: "foobar",
|
||||
Method: "foobar",
|
||||
Status: 401,
|
||||
Port: 42,
|
||||
Interval: ptypes.Duration(time.Second),
|
||||
Timeout: ptypes.Duration(time.Second),
|
||||
Hostname: "foobar",
|
||||
Scheme: "foobar",
|
||||
Mode: "foobar",
|
||||
Path: "foobar",
|
||||
Method: "foobar",
|
||||
Status: 401,
|
||||
Port: 42,
|
||||
Interval: ptypes.Duration(time.Second),
|
||||
UnhealthyInterval: pointer(ptypes.Duration(time.Second)),
|
||||
Timeout: ptypes.Duration(time.Second),
|
||||
Hostname: "foobar",
|
||||
Headers: map[string]string{
|
||||
"name0": "foobar",
|
||||
"name1": "foobar",
|
||||
|
|
@ -735,15 +738,16 @@ func TestDecodeConfiguration(t *testing.T) {
|
|||
},
|
||||
},
|
||||
HealthCheck: &dynamic.ServerHealthCheck{
|
||||
Scheme: "foobar",
|
||||
Mode: "foobar",
|
||||
Path: "foobar",
|
||||
Method: "foobar",
|
||||
Status: 401,
|
||||
Port: 42,
|
||||
Interval: ptypes.Duration(time.Second),
|
||||
Timeout: ptypes.Duration(time.Second),
|
||||
Hostname: "foobar",
|
||||
Scheme: "foobar",
|
||||
Mode: "foobar",
|
||||
Path: "foobar",
|
||||
Method: "foobar",
|
||||
Status: 401,
|
||||
Port: 42,
|
||||
Interval: ptypes.Duration(time.Second),
|
||||
UnhealthyInterval: pointer(ptypes.Duration(time.Second)),
|
||||
Timeout: ptypes.Duration(time.Second),
|
||||
Hostname: "foobar",
|
||||
Headers: map[string]string{
|
||||
"name0": "foobar",
|
||||
"name1": "foobar",
|
||||
|
|
@ -1244,14 +1248,15 @@ func TestEncodeConfiguration(t *testing.T) {
|
|||
},
|
||||
},
|
||||
HealthCheck: &dynamic.ServerHealthCheck{
|
||||
Scheme: "foobar",
|
||||
Path: "foobar",
|
||||
Method: "foobar",
|
||||
Status: 401,
|
||||
Port: 42,
|
||||
Interval: ptypes.Duration(time.Second),
|
||||
Timeout: ptypes.Duration(time.Second),
|
||||
Hostname: "foobar",
|
||||
Scheme: "foobar",
|
||||
Path: "foobar",
|
||||
Method: "foobar",
|
||||
Status: 401,
|
||||
Port: 42,
|
||||
Interval: ptypes.Duration(time.Second),
|
||||
UnhealthyInterval: pointer(ptypes.Duration(time.Second)),
|
||||
Timeout: ptypes.Duration(time.Second),
|
||||
Hostname: "foobar",
|
||||
Headers: map[string]string{
|
||||
"name0": "foobar",
|
||||
"name1": "foobar",
|
||||
|
|
@ -1276,14 +1281,15 @@ func TestEncodeConfiguration(t *testing.T) {
|
|||
},
|
||||
},
|
||||
HealthCheck: &dynamic.ServerHealthCheck{
|
||||
Scheme: "foobar",
|
||||
Path: "foobar",
|
||||
Method: "foobar",
|
||||
Status: 401,
|
||||
Port: 42,
|
||||
Interval: ptypes.Duration(time.Second),
|
||||
Timeout: ptypes.Duration(time.Second),
|
||||
Hostname: "foobar",
|
||||
Scheme: "foobar",
|
||||
Path: "foobar",
|
||||
Method: "foobar",
|
||||
Status: 401,
|
||||
Port: 42,
|
||||
Interval: ptypes.Duration(time.Second),
|
||||
UnhealthyInterval: pointer(ptypes.Duration(time.Second)),
|
||||
Timeout: ptypes.Duration(time.Second),
|
||||
Hostname: "foobar",
|
||||
Headers: map[string]string{
|
||||
"name0": "foobar",
|
||||
"name1": "foobar",
|
||||
|
|
@ -1471,6 +1477,7 @@ func TestEncodeConfiguration(t *testing.T) {
|
|||
"traefik.HTTP.Services.Service0.LoadBalancer.HealthCheck.Headers.name1": "foobar",
|
||||
"traefik.HTTP.Services.Service0.LoadBalancer.HealthCheck.Hostname": "foobar",
|
||||
"traefik.HTTP.Services.Service0.LoadBalancer.HealthCheck.Interval": "1000000000",
|
||||
"traefik.HTTP.Services.Service0.LoadBalancer.HealthCheck.UnhealthyInterval": "1000000000",
|
||||
"traefik.HTTP.Services.Service0.LoadBalancer.HealthCheck.Path": "foobar",
|
||||
"traefik.HTTP.Services.Service0.LoadBalancer.HealthCheck.Method": "foobar",
|
||||
"traefik.HTTP.Services.Service0.LoadBalancer.HealthCheck.Status": "401",
|
||||
|
|
@ -1495,6 +1502,7 @@ func TestEncodeConfiguration(t *testing.T) {
|
|||
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.Headers.name1": "foobar",
|
||||
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.Hostname": "foobar",
|
||||
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.Interval": "1000000000",
|
||||
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.UnhealthyInterval": "1000000000",
|
||||
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.Path": "foobar",
|
||||
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.Method": "foobar",
|
||||
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.Status": "401",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue