Allow configuring server URLs with label providers

This commit is contained in:
Taylor Yelverton 2025-01-09 10:20:06 -06:00 committed by GitHub
parent b0a72960bc
commit 95dd17e020
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 924 additions and 48 deletions

View file

@ -171,6 +171,8 @@ func TestDecodeConfiguration(t *testing.T) {
"traefik.http.services.Service0.loadbalancer.healthcheck.followredirects": "true",
"traefik.http.services.Service0.loadbalancer.passhostheader": "true",
"traefik.http.services.Service0.loadbalancer.responseforwarding.flushinterval": "1s",
"traefik.http.services.Service0.loadbalancer.server.url": "foobar",
"traefik.http.services.Service0.loadbalancer.server.preservepath": "true",
"traefik.http.services.Service0.loadbalancer.server.scheme": "foobar",
"traefik.http.services.Service0.loadbalancer.server.port": "8080",
"traefik.http.services.Service0.loadbalancer.sticky.cookie.name": "foobar",
@ -191,6 +193,8 @@ func TestDecodeConfiguration(t *testing.T) {
"traefik.http.services.Service1.loadbalancer.healthcheck.followredirects": "true",
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
"traefik.http.services.Service1.loadbalancer.responseforwarding.flushinterval": "1s",
"traefik.http.services.Service1.loadbalancer.server.url": "foobar",
"traefik.http.services.Service1.loadbalancer.server.preservepath": "true",
"traefik.http.services.Service1.loadbalancer.server.scheme": "foobar",
"traefik.http.services.Service1.loadbalancer.server.port": "8080",
"traefik.http.services.Service1.loadbalancer.sticky": "false",
@ -683,8 +687,10 @@ func TestDecodeConfiguration(t *testing.T) {
},
Servers: []dynamic.Server{
{
Scheme: "foobar",
Port: "8080",
URL: "foobar",
PreservePath: true,
Scheme: "foobar",
Port: "8080",
},
},
HealthCheck: &dynamic.ServerHealthCheck{
@ -714,8 +720,10 @@ func TestDecodeConfiguration(t *testing.T) {
LoadBalancer: &dynamic.ServersLoadBalancer{
Servers: []dynamic.Server{
{
Scheme: "foobar",
Port: "8080",
URL: "foobar",
PreservePath: true,
Scheme: "foobar",
Port: "8080",
},
},
HealthCheck: &dynamic.ServerHealthCheck{
@ -1218,8 +1226,10 @@ func TestEncodeConfiguration(t *testing.T) {
},
Servers: []dynamic.Server{
{
Scheme: "foobar",
Port: "8080",
URL: "foobar",
PreservePath: true,
Scheme: "foobar",
Port: "8080",
},
},
HealthCheck: &dynamic.ServerHealthCheck{
@ -1247,8 +1257,10 @@ func TestEncodeConfiguration(t *testing.T) {
LoadBalancer: &dynamic.ServersLoadBalancer{
Servers: []dynamic.Server{
{
Scheme: "foobar",
Port: "8080",
URL: "foobar",
PreservePath: true,
Scheme: "foobar",
Port: "8080",
},
},
HealthCheck: &dynamic.ServerHealthCheck{
@ -1454,6 +1466,8 @@ func TestEncodeConfiguration(t *testing.T) {
"traefik.HTTP.Services.Service0.LoadBalancer.HealthCheck.Timeout": "1000000000",
"traefik.HTTP.Services.Service0.LoadBalancer.PassHostHeader": "true",
"traefik.HTTP.Services.Service0.LoadBalancer.ResponseForwarding.FlushInterval": "1000000000",
"traefik.HTTP.Services.Service0.LoadBalancer.server.URL": "foobar",
"traefik.HTTP.Services.Service0.LoadBalancer.server.PreservePath": "true",
"traefik.HTTP.Services.Service0.LoadBalancer.server.Port": "8080",
"traefik.HTTP.Services.Service0.LoadBalancer.server.Scheme": "foobar",
"traefik.HTTP.Services.Service0.LoadBalancer.Sticky.Cookie.Name": "foobar",
@ -1474,6 +1488,8 @@ func TestEncodeConfiguration(t *testing.T) {
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.Timeout": "1000000000",
"traefik.HTTP.Services.Service1.LoadBalancer.PassHostHeader": "true",
"traefik.HTTP.Services.Service1.LoadBalancer.ResponseForwarding.FlushInterval": "1000000000",
"traefik.HTTP.Services.Service1.LoadBalancer.server.URL": "foobar",
"traefik.HTTP.Services.Service1.LoadBalancer.server.PreservePath": "true",
"traefik.HTTP.Services.Service1.LoadBalancer.server.Port": "8080",
"traefik.HTTP.Services.Service1.LoadBalancer.server.Scheme": "foobar",
"traefik.HTTP.Services.Service1.LoadBalancer.ServersTransport": "foobar",