Fix kubernetes id name
This commit is contained in:
parent
685c6dc00c
commit
255e88fbf6
6 changed files with 255 additions and 251 deletions
38
integration/testdata/rawdata-crd.json
vendored
38
integration/testdata/rawdata-crd.json
vendored
|
@ -1,28 +1,28 @@
|
||||||
{
|
{
|
||||||
"routers": {
|
"routers": {
|
||||||
"default/test.route-6b204d94623b3df4370c@kubernetescrd": {
|
"default-test.route-6b204d94623b3df4370c@kubernetescrd": {
|
||||||
"entryPoints": [
|
"entryPoints": [
|
||||||
"web"
|
"web"
|
||||||
],
|
],
|
||||||
"service": "default/test.route-6b204d94623b3df4370c",
|
"service": "default-test.route-6b204d94623b3df4370c",
|
||||||
"rule": "Host(`foo.com`) \u0026\u0026 PathPrefix(`/bar`)",
|
"rule": "Host(`foo.com`) \u0026\u0026 PathPrefix(`/bar`)",
|
||||||
"priority": 12,
|
"priority": 12,
|
||||||
"tls": {
|
"tls": {
|
||||||
"options": "default/mytlsoption"
|
"options": "default-mytlsoption"
|
||||||
},
|
},
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"using": [
|
"using": [
|
||||||
"web"
|
"web"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default/test2.route-23c7f4c450289ee29016@kubernetescrd": {
|
"default-test2.route-23c7f4c450289ee29016@kubernetescrd": {
|
||||||
"entryPoints": [
|
"entryPoints": [
|
||||||
"web"
|
"web"
|
||||||
],
|
],
|
||||||
"middlewares": [
|
"middlewares": [
|
||||||
"default/mychain@kubernetescrd"
|
"default-mychain@kubernetescrd"
|
||||||
],
|
],
|
||||||
"service": "default/test2.route-23c7f4c450289ee29016",
|
"service": "default-test2.route-23c7f4c450289ee29016",
|
||||||
"rule": "Host(`foo.com`) \u0026\u0026 PathPrefix(`/tobestripped`)",
|
"rule": "Host(`foo.com`) \u0026\u0026 PathPrefix(`/tobestripped`)",
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"using": [
|
"using": [
|
||||||
|
@ -31,18 +31,18 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"middlewares": {
|
"middlewares": {
|
||||||
"default/mychain@kubernetescrd": {
|
"default-mychain@kubernetescrd": {
|
||||||
"chain": {
|
"chain": {
|
||||||
"middlewares": [
|
"middlewares": [
|
||||||
"default/stripprefix@kubernetescrd"
|
"default-stripprefix@kubernetescrd"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"usedBy": [
|
"usedBy": [
|
||||||
"default/test2.route-23c7f4c450289ee29016@kubernetescrd"
|
"default-test2.route-23c7f4c450289ee29016@kubernetescrd"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default/stripprefix@kubernetescrd": {
|
"default-stripprefix@kubernetescrd": {
|
||||||
"stripPrefix": {
|
"stripPrefix": {
|
||||||
"prefixes": [
|
"prefixes": [
|
||||||
"/tobestripped"
|
"/tobestripped"
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"default/test.route-6b204d94623b3df4370c@kubernetescrd": {
|
"default-test.route-6b204d94623b3df4370c@kubernetescrd": {
|
||||||
"loadBalancer": {
|
"loadBalancer": {
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
|
@ -66,14 +66,14 @@
|
||||||
},
|
},
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"usedBy": [
|
"usedBy": [
|
||||||
"default/test.route-6b204d94623b3df4370c@kubernetescrd"
|
"default-test.route-6b204d94623b3df4370c@kubernetescrd"
|
||||||
],
|
],
|
||||||
"serverStatus": {
|
"serverStatus": {
|
||||||
"http://10.42.0.2:80": "UP",
|
"http://10.42.0.2:80": "UP",
|
||||||
"http://10.42.0.6:80": "UP"
|
"http://10.42.0.6:80": "UP"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default/test2.route-23c7f4c450289ee29016@kubernetescrd": {
|
"default-test2.route-23c7f4c450289ee29016@kubernetescrd": {
|
||||||
"loadBalancer": {
|
"loadBalancer": {
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
},
|
},
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"usedBy": [
|
"usedBy": [
|
||||||
"default/test2.route-23c7f4c450289ee29016@kubernetescrd"
|
"default-test2.route-23c7f4c450289ee29016@kubernetescrd"
|
||||||
],
|
],
|
||||||
"serverStatus": {
|
"serverStatus": {
|
||||||
"http://10.42.0.2:80": "UP",
|
"http://10.42.0.2:80": "UP",
|
||||||
|
@ -96,15 +96,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tcpRouters": {
|
"tcpRouters": {
|
||||||
"default/test3.route-673acf455cb2dab0b43a@kubernetescrd": {
|
"default-test3.route-673acf455cb2dab0b43a@kubernetescrd": {
|
||||||
"entryPoints": [
|
"entryPoints": [
|
||||||
"footcp"
|
"footcp"
|
||||||
],
|
],
|
||||||
"service": "default/test3.route-673acf455cb2dab0b43a",
|
"service": "default-test3.route-673acf455cb2dab0b43a",
|
||||||
"rule": "HostSNI(`*`)",
|
"rule": "HostSNI(`*`)",
|
||||||
"tls": {
|
"tls": {
|
||||||
"passthrough": false,
|
"passthrough": false,
|
||||||
"options": "default/mytlsoption"
|
"options": "default-mytlsoption"
|
||||||
},
|
},
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"using": [
|
"using": [
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tcpServices": {
|
"tcpServices": {
|
||||||
"default/test3.route-673acf455cb2dab0b43a@kubernetescrd": {
|
"default-test3.route-673acf455cb2dab0b43a@kubernetescrd": {
|
||||||
"loadBalancer": {
|
"loadBalancer": {
|
||||||
"terminationDelay": 100,
|
"terminationDelay": 100,
|
||||||
"servers": [
|
"servers": [
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
},
|
},
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"usedBy": [
|
"usedBy": [
|
||||||
"default/test3.route-673acf455cb2dab0b43a@kubernetescrd"
|
"default-test3.route-673acf455cb2dab0b43a@kubernetescrd"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
20
integration/testdata/rawdata-ingress.json
vendored
20
integration/testdata/rawdata-ingress.json
vendored
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"routers": {
|
"routers": {
|
||||||
"whoami-test-https/whoami-tls@kubernetes": {
|
"whoami-test-https-whoami-tls@kubernetes": {
|
||||||
"service": "default/whoami/http",
|
"service": "default-whoami-http",
|
||||||
"rule": "Host(`whoami.test.https`) \u0026\u0026 PathPrefix(`/whoami`)",
|
"rule": "Host(`whoami.test.https`) \u0026\u0026 PathPrefix(`/whoami`)",
|
||||||
"tls": {},
|
"tls": {},
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
|
@ -10,8 +10,8 @@
|
||||||
"web"
|
"web"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"whoami-test-https/whoami@kubernetes": {
|
"whoami-test-https-whoami@kubernetes": {
|
||||||
"service": "default/whoami/http",
|
"service": "default-whoami-http",
|
||||||
"rule": "Host(`whoami.test.https`) \u0026\u0026 PathPrefix(`/whoami`)",
|
"rule": "Host(`whoami.test.https`) \u0026\u0026 PathPrefix(`/whoami`)",
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"using": [
|
"using": [
|
||||||
|
@ -19,8 +19,8 @@
|
||||||
"web"
|
"web"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"whoami-test/whoami@kubernetes": {
|
"whoami-test-whoami@kubernetes": {
|
||||||
"service": "default/whoami/http",
|
"service": "default-whoami-http",
|
||||||
"rule": "Host(`whoami.test`) \u0026\u0026 PathPrefix(`/whoami`)",
|
"rule": "Host(`whoami.test`) \u0026\u0026 PathPrefix(`/whoami`)",
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"using": [
|
"using": [
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"default/whoami/http@kubernetes": {
|
"default-whoami-http@kubernetes": {
|
||||||
"loadBalancer": {
|
"loadBalancer": {
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
|
@ -44,9 +44,9 @@
|
||||||
},
|
},
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"usedBy": [
|
"usedBy": [
|
||||||
"whoami-test-https/whoami-tls@kubernetes",
|
"whoami-test-https-whoami-tls@kubernetes",
|
||||||
"whoami-test-https/whoami@kubernetes",
|
"whoami-test-https-whoami@kubernetes",
|
||||||
"whoami-test/whoami@kubernetes"
|
"whoami-test-whoami@kubernetes"
|
||||||
],
|
],
|
||||||
"serverStatus": {
|
"serverStatus": {
|
||||||
"http://10.42.0.2:80": "UP",
|
"http://10.42.0.2:80": "UP",
|
||||||
|
|
|
@ -511,7 +511,7 @@ func makeID(namespace, name string) string {
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
|
|
||||||
return namespace + "/" + name
|
return namespace + "-" + name
|
||||||
}
|
}
|
||||||
|
|
||||||
func shouldProcessIngress(ingressClass string, ingressClassAnnotation string) bool {
|
func shouldProcessIngress(ingressClass string, ingressClassAnnotation string) bool {
|
||||||
|
|
|
@ -47,14 +47,14 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
},
|
},
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -79,19 +79,19 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
},
|
},
|
||||||
"default/test.route-f44ce589164e656d231c": {
|
"default-test.route-f44ce589164e656d231c": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-f44ce589164e656d231c",
|
Service: "default-test.route-f44ce589164e656d231c",
|
||||||
Rule: "HostSNI(`bar.com`)",
|
Rule: "HostSNI(`bar.com`)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -105,7 +105,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/test.route-f44ce589164e656d231c": {
|
"default-test.route-f44ce589164e656d231c": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -135,28 +135,28 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
Weighted: &dynamic.TCPWeightedRoundRobin{
|
Weighted: &dynamic.TCPWeightedRoundRobin{
|
||||||
Services: []dynamic.TCPWRRService{
|
Services: []dynamic.TCPWRRService{
|
||||||
{
|
{
|
||||||
Name: "default/test.route-fdd3e9338e47a45efefc-whoamitcp-8000",
|
Name: "default-test.route-fdd3e9338e47a45efefc-whoamitcp-8000",
|
||||||
Weight: func(i int) *int { return &i }(2),
|
Weight: func(i int) *int { return &i }(2),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "default/test.route-fdd3e9338e47a45efefc-whoamitcp2-8080",
|
Name: "default-test.route-fdd3e9338e47a45efefc-whoamitcp2-8080",
|
||||||
Weight: func(i int) *int { return &i }(3),
|
Weight: func(i int) *int { return &i }(3),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/test.route-fdd3e9338e47a45efefc-whoamitcp-8000": {
|
"default-test.route-fdd3e9338e47a45efefc-whoamitcp-8000": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -168,7 +168,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/test.route-fdd3e9338e47a45efefc-whoamitcp2-8080": {
|
"default-test.route-fdd3e9338e47a45efefc-whoamitcp2-8080": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -255,15 +255,15 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
},
|
},
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -292,9 +292,9 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
TLS: &dynamic.RouterTCPTLSConfig{
|
TLS: &dynamic.RouterTCPTLSConfig{
|
||||||
Passthrough: true,
|
Passthrough: true,
|
||||||
|
@ -302,7 +302,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -332,7 +332,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"default/foo": {
|
"default-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
CipherSuites: []string{
|
CipherSuites: []string{
|
||||||
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
||||||
|
@ -351,17 +351,17 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
},
|
},
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
TLS: &dynamic.RouterTCPTLSConfig{
|
TLS: &dynamic.RouterTCPTLSConfig{
|
||||||
Options: "default/foo",
|
Options: "default-foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -390,7 +390,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"myns/foo": {
|
"myns-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
CipherSuites: []string{
|
CipherSuites: []string{
|
||||||
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
||||||
|
@ -409,17 +409,17 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
},
|
},
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
TLS: &dynamic.RouterTCPTLSConfig{
|
TLS: &dynamic.RouterTCPTLSConfig{
|
||||||
Options: "myns/foo",
|
Options: "myns-foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -448,7 +448,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"default/foo": {
|
"default-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
CipherSuites: []string{
|
CipherSuites: []string{
|
||||||
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
||||||
|
@ -466,17 +466,17 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
},
|
},
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
TLS: &dynamic.RouterTCPTLSConfig{
|
TLS: &dynamic.RouterTCPTLSConfig{
|
||||||
Options: "default/foo",
|
Options: "default-foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -505,24 +505,24 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"default/foo": {
|
"default-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
TLS: &dynamic.RouterTCPTLSConfig{
|
TLS: &dynamic.RouterTCPTLSConfig{
|
||||||
Options: "default/unknown",
|
Options: "default-unknown",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -551,24 +551,24 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"default/foo": {
|
"default-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
TLS: &dynamic.RouterTCPTLSConfig{
|
TLS: &dynamic.RouterTCPTLSConfig{
|
||||||
Options: "unknown/foo",
|
Options: "unknown-foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -597,15 +597,15 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -636,14 +636,14 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
||||||
TLS: &dynamic.TLSConfiguration{},
|
TLS: &dynamic.TLSConfiguration{},
|
||||||
TCP: &dynamic.TCPConfiguration{
|
TCP: &dynamic.TCPConfiguration{
|
||||||
Routers: map[string]*dynamic.TCPRouter{
|
Routers: map[string]*dynamic.TCPRouter{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
Service: "default-test.route-fdd3e9338e47a45efefc",
|
||||||
Rule: "HostSNI(`foo.com`)",
|
Rule: "HostSNI(`foo.com`)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.TCPService{
|
Services: map[string]*dynamic.TCPService{
|
||||||
"default/test.route-fdd3e9338e47a45efefc": {
|
"default-test.route-fdd3e9338e47a45efefc": {
|
||||||
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
LoadBalancer: &dynamic.TCPServersLoadBalancer{
|
||||||
Servers: []dynamic.TCPServer{
|
Servers: []dynamic.TCPServer{
|
||||||
{
|
{
|
||||||
|
@ -718,16 +718,16 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -755,28 +755,28 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test2.route-23c7f4c450289ee29016": {
|
"default-test2.route-23c7f4c450289ee29016": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test2.route-23c7f4c450289ee29016",
|
Service: "default-test2.route-23c7f4c450289ee29016",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/tobestripped`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/tobestripped`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
Middlewares: []string{"default/stripprefix", "foo/addprefix"},
|
Middlewares: []string{"default-stripprefix", "foo-addprefix"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{
|
Middlewares: map[string]*dynamic.Middleware{
|
||||||
"default/stripprefix": {
|
"default-stripprefix": {
|
||||||
StripPrefix: &dynamic.StripPrefix{
|
StripPrefix: &dynamic.StripPrefix{
|
||||||
Prefixes: []string{"/tobestripped"},
|
Prefixes: []string{"/tobestripped"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"foo/addprefix": {
|
"foo-addprefix": {
|
||||||
AddPrefix: &dynamic.AddPrefix{
|
AddPrefix: &dynamic.AddPrefix{
|
||||||
Prefix: "/tobeadded",
|
Prefix: "/tobeadded",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test2.route-23c7f4c450289ee29016": {
|
"default-test2.route-23c7f4c450289ee29016": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -805,28 +805,28 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test2.route-23c7f4c450289ee29016": {
|
"default-test2.route-23c7f4c450289ee29016": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test2.route-23c7f4c450289ee29016",
|
Service: "default-test2.route-23c7f4c450289ee29016",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/tobestripped`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/tobestripped`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
Middlewares: []string{"default/stripprefix", "foo/addprefix", "basicauth@file", "redirect@file"},
|
Middlewares: []string{"default-stripprefix", "foo-addprefix", "basicauth@file", "redirect@file"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{
|
Middlewares: map[string]*dynamic.Middleware{
|
||||||
"default/stripprefix": {
|
"default-stripprefix": {
|
||||||
StripPrefix: &dynamic.StripPrefix{
|
StripPrefix: &dynamic.StripPrefix{
|
||||||
Prefixes: []string{"/tobestripped"},
|
Prefixes: []string{"/tobestripped"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"foo/addprefix": {
|
"foo-addprefix": {
|
||||||
AddPrefix: &dynamic.AddPrefix{
|
AddPrefix: &dynamic.AddPrefix{
|
||||||
Prefix: "/tobeadded",
|
Prefix: "/tobeadded",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test2.route-23c7f4c450289ee29016": {
|
"default-test2.route-23c7f4c450289ee29016": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -853,22 +853,22 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Priority: 14,
|
Priority: 14,
|
||||||
},
|
},
|
||||||
"default/test.route-77c62dfe9517144aeeaa": {
|
"default-test.route-77c62dfe9517144aeeaa": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-77c62dfe9517144aeeaa",
|
Service: "default-test.route-77c62dfe9517144aeeaa",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/foo`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/foo`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -881,7 +881,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/test.route-77c62dfe9517144aeeaa": {
|
"default-test.route-77c62dfe9517144aeeaa": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -910,30 +910,30 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-77c62dfe9517144aeeaa": {
|
"default-test.route-77c62dfe9517144aeeaa": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-77c62dfe9517144aeeaa",
|
Service: "default-test.route-77c62dfe9517144aeeaa",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/foo`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/foo`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-77c62dfe9517144aeeaa": {
|
"default-test.route-77c62dfe9517144aeeaa": {
|
||||||
Weighted: &dynamic.WeightedRoundRobin{
|
Weighted: &dynamic.WeightedRoundRobin{
|
||||||
Services: []dynamic.WRRService{
|
Services: []dynamic.WRRService{
|
||||||
{
|
{
|
||||||
Name: "default/test.route-77c62dfe9517144aeeaa-whoami-80",
|
Name: "default-test.route-77c62dfe9517144aeeaa-whoami-80",
|
||||||
Weight: func(i int) *int { return &i }(1),
|
Weight: func(i int) *int { return &i }(1),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "default/test.route-77c62dfe9517144aeeaa-whoami2-8080",
|
Name: "default-test.route-77c62dfe9517144aeeaa-whoami2-8080",
|
||||||
Weight: func(i int) *int { return &i }(1),
|
Weight: func(i int) *int { return &i }(1),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/test.route-77c62dfe9517144aeeaa-whoami-80": {
|
"default-test.route-77c62dfe9517144aeeaa-whoami-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -946,7 +946,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/test.route-77c62dfe9517144aeeaa-whoami2-8080": {
|
"default-test.route-77c62dfe9517144aeeaa-whoami2-8080": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -974,30 +974,30 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-77c62dfe9517144aeeaa": {
|
"default-test.route-77c62dfe9517144aeeaa": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-77c62dfe9517144aeeaa",
|
Service: "default-test.route-77c62dfe9517144aeeaa",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/foo`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/foo`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-77c62dfe9517144aeeaa": {
|
"default-test.route-77c62dfe9517144aeeaa": {
|
||||||
Weighted: &dynamic.WeightedRoundRobin{
|
Weighted: &dynamic.WeightedRoundRobin{
|
||||||
Services: []dynamic.WRRService{
|
Services: []dynamic.WRRService{
|
||||||
{
|
{
|
||||||
Name: "default/test.route-77c62dfe9517144aeeaa-whoami-80",
|
Name: "default-test.route-77c62dfe9517144aeeaa-whoami-80",
|
||||||
Weight: Int(10),
|
Weight: Int(10),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "default/test.route-77c62dfe9517144aeeaa-whoami2-8080",
|
Name: "default-test.route-77c62dfe9517144aeeaa-whoami2-8080",
|
||||||
Weight: Int(0),
|
Weight: Int(0),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/test.route-77c62dfe9517144aeeaa-whoami-80": {
|
"default-test.route-77c62dfe9517144aeeaa-whoami-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1010,7 +1010,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/test.route-77c62dfe9517144aeeaa-whoami2-8080": {
|
"default-test.route-77c62dfe9517144aeeaa-whoami2-8080": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1112,9 +1112,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
TLS: &dynamic.RouterTLSConfig{},
|
TLS: &dynamic.RouterTLSConfig{},
|
||||||
|
@ -1122,7 +1122,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1145,7 +1145,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"default/foo": {
|
"default-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
CipherSuites: []string{
|
CipherSuites: []string{
|
||||||
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
||||||
|
@ -1168,19 +1168,19 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
TLS: &dynamic.RouterTLSConfig{
|
TLS: &dynamic.RouterTLSConfig{
|
||||||
Options: "default/foo",
|
Options: "default-foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1203,7 +1203,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"myns/foo": {
|
"myns-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
CipherSuites: []string{
|
CipherSuites: []string{
|
||||||
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
||||||
|
@ -1226,19 +1226,19 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
TLS: &dynamic.RouterTLSConfig{
|
TLS: &dynamic.RouterTLSConfig{
|
||||||
Options: "myns/foo",
|
Options: "myns-foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1261,7 +1261,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"default/foo": {
|
"default-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
CipherSuites: []string{
|
CipherSuites: []string{
|
||||||
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
||||||
|
@ -1283,19 +1283,19 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
TLS: &dynamic.RouterTLSConfig{
|
TLS: &dynamic.RouterTLSConfig{
|
||||||
Options: "default/foo",
|
Options: "default-foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1318,7 +1318,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"default/foo": {
|
"default-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1329,19 +1329,19 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
TLS: &dynamic.RouterTLSConfig{
|
TLS: &dynamic.RouterTLSConfig{
|
||||||
Options: "default/unknown",
|
Options: "default-unknown",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1364,7 +1364,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
expected: &dynamic.Configuration{
|
expected: &dynamic.Configuration{
|
||||||
TLS: &dynamic.TLSConfiguration{
|
TLS: &dynamic.TLSConfiguration{
|
||||||
Options: map[string]tls.Options{
|
Options: map[string]tls.Options{
|
||||||
"default/foo": {
|
"default-foo": {
|
||||||
MinVersion: "VersionTLS12",
|
MinVersion: "VersionTLS12",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1375,19 +1375,19 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
TLS: &dynamic.RouterTLSConfig{
|
TLS: &dynamic.RouterTLSConfig{
|
||||||
Options: "unknown/foo",
|
Options: "unknown-foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1415,9 +1415,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
TLS: &dynamic.RouterTLSConfig{},
|
TLS: &dynamic.RouterTLSConfig{},
|
||||||
|
@ -1425,7 +1425,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1453,16 +1453,16 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1490,16 +1490,16 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1528,17 +1528,17 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{},
|
Routers: map[string]*dynamic.Router{},
|
||||||
Middlewares: map[string]*dynamic.Middleware{
|
Middlewares: map[string]*dynamic.Middleware{
|
||||||
"default/basicauth": {
|
"default-basicauth": {
|
||||||
BasicAuth: &dynamic.BasicAuth{
|
BasicAuth: &dynamic.BasicAuth{
|
||||||
Users: dynamic.Users{"test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"},
|
Users: dynamic.Users{"test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/digestauth": {
|
"default-digestauth": {
|
||||||
DigestAuth: &dynamic.DigestAuth{
|
DigestAuth: &dynamic.DigestAuth{
|
||||||
Users: dynamic.Users{"test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"},
|
Users: dynamic.Users{"test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"default/forwardauth": {
|
"default-forwardauth": {
|
||||||
ForwardAuth: &dynamic.ForwardAuth{
|
ForwardAuth: &dynamic.ForwardAuth{
|
||||||
Address: "test.com",
|
Address: "test.com",
|
||||||
TLS: &dynamic.ClientTLS{
|
TLS: &dynamic.ClientTLS{
|
||||||
|
@ -1565,16 +1565,16 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{},
|
Routers: map[string]*dynamic.Router{},
|
||||||
Middlewares: map[string]*dynamic.Middleware{
|
Middlewares: map[string]*dynamic.Middleware{
|
||||||
"default/errorpage": {
|
"default-errorpage": {
|
||||||
Errors: &dynamic.ErrorPage{
|
Errors: &dynamic.ErrorPage{
|
||||||
Status: []string{"404", "500"},
|
Status: []string{"404", "500"},
|
||||||
Service: "default/errorpage-errorpage-service",
|
Service: "default-errorpage-errorpage-service",
|
||||||
Query: "query",
|
Query: "query",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/errorpage-errorpage-service": {
|
"default-errorpage-errorpage-service": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
@ -1601,16 +1601,16 @@ func TestLoadIngressRoutes(t *testing.T) {
|
||||||
},
|
},
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
EntryPoints: []string{"foo"},
|
EntryPoints: []string{"foo"},
|
||||||
Service: "default/test.route-6b204d94623b3df4370c",
|
Service: "default-test.route-6b204d94623b3df4370c",
|
||||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||||
Priority: 12,
|
Priority: 12,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"default/test.route-6b204d94623b3df4370c": {
|
"default-test.route-6b204d94623b3df4370c": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
{
|
{
|
||||||
|
|
|
@ -325,7 +325,7 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
serviceName := ingress.Namespace + "/" + p.Backend.ServiceName + "/" + p.Backend.ServicePort.String()
|
serviceName := ingress.Namespace + "-" + p.Backend.ServiceName + "-" + p.Backend.ServicePort.String()
|
||||||
serviceName = strings.ReplaceAll(serviceName, ".", "-")
|
serviceName = strings.ReplaceAll(serviceName, ".", "-")
|
||||||
var rules []string
|
var rules []string
|
||||||
if len(rule.Host) > 0 {
|
if len(rule.Host) > 0 {
|
||||||
|
@ -336,14 +336,18 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl
|
||||||
rules = append(rules, "PathPrefix(`"+p.Path+"`)")
|
rules = append(rules, "PathPrefix(`"+p.Path+"`)")
|
||||||
}
|
}
|
||||||
|
|
||||||
conf.HTTP.Routers[strings.Replace(rule.Host, ".", "-", -1)+p.Path] = &dynamic.Router{
|
routerKey := strings.Replace(rule.Host, ".", "-", -1) + strings.Replace(p.Path, "/", "-", 1)
|
||||||
|
if strings.HasPrefix(routerKey, "-") {
|
||||||
|
routerKey = strings.Replace(routerKey, "-", "", 1)
|
||||||
|
}
|
||||||
|
conf.HTTP.Routers[routerKey] = &dynamic.Router{
|
||||||
Rule: strings.Join(rules, " && "),
|
Rule: strings.Join(rules, " && "),
|
||||||
Service: serviceName,
|
Service: serviceName,
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(ingress.Spec.TLS) > 0 {
|
if len(ingress.Spec.TLS) > 0 {
|
||||||
// TLS enabled for this ingress, add TLS router
|
// TLS enabled for this ingress, add TLS router
|
||||||
conf.HTTP.Routers[strings.Replace(rule.Host, ".", "-", -1)+p.Path+"-tls"] = &dynamic.Router{
|
conf.HTTP.Routers[routerKey+"-tls"] = &dynamic.Router{
|
||||||
Rule: strings.Join(rules, " && "),
|
Rule: strings.Join(rules, " && "),
|
||||||
Service: serviceName,
|
Service: serviceName,
|
||||||
TLS: &dynamic.RouterTLSConfig{},
|
TLS: &dynamic.RouterTLSConfig{},
|
||||||
|
@ -381,7 +385,7 @@ func getTLS(ctx context.Context, ingress *v1beta1.Ingress, k8sClient Client, tls
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
configKey := ingress.Namespace + "/" + t.SecretName
|
configKey := ingress.Namespace + "-" + t.SecretName
|
||||||
if _, tlsExists := tlsConfigs[configKey]; !tlsExists {
|
if _, tlsExists := tlsConfigs[configKey]; !tlsExists {
|
||||||
secret, exists, err := k8sClient.GetSecret(ingress.Namespace, t.SecretName)
|
secret, exists, err := k8sClient.GetSecret(ingress.Namespace, t.SecretName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -43,13 +43,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"/bar": {
|
"bar": {
|
||||||
Rule: "PathPrefix(`/bar`)",
|
Rule: "PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -73,17 +73,17 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"/bar": {
|
"bar": {
|
||||||
Rule: "PathPrefix(`/bar`)",
|
Rule: "PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
"/foo": {
|
"foo": {
|
||||||
Rule: "PathPrefix(`/foo`)",
|
Rule: "PathPrefix(`/foo`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -107,17 +107,17 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"/bar": {
|
"bar": {
|
||||||
Rule: "PathPrefix(`/bar`)",
|
Rule: "PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
"/foo": {
|
"foo": {
|
||||||
Rule: "PathPrefix(`/foo`)",
|
Rule: "PathPrefix(`/foo`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -141,13 +141,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -172,11 +172,11 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"example-com": {
|
"example-com": {
|
||||||
Rule: "Host(`example.com`)",
|
Rule: "Host(`example.com`)",
|
||||||
Service: "testing/example-com/80",
|
Service: "testing-example-com-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/example-com/80": {
|
"testing-example-com-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -197,17 +197,17 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
"traefik-tchouk/foo": {
|
"traefik-tchouk-foo": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/foo`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/foo`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -231,17 +231,17 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
"traefik-courgette/carotte": {
|
"traefik-courgette-carotte": {
|
||||||
Rule: "Host(`traefik.courgette`) && PathPrefix(`/carotte`)",
|
Rule: "Host(`traefik.courgette`) && PathPrefix(`/carotte`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -265,17 +265,17 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"/bar": {
|
"bar": {
|
||||||
Rule: "PathPrefix(`/bar`)",
|
Rule: "PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
"/foo": {
|
"foo": {
|
||||||
Rule: "PathPrefix(`/foo`)",
|
Rule: "PathPrefix(`/foo`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -310,13 +310,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-courgette/carotte": {
|
"traefik-courgette-carotte": {
|
||||||
Rule: "Host(`traefik.courgette`) && PathPrefix(`/carotte`)",
|
Rule: "Host(`traefik.courgette`) && PathPrefix(`/carotte`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -351,17 +351,17 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
"traefik-courgette/carotte": {
|
"traefik-courgette-carotte": {
|
||||||
Rule: "Host(`traefik.courgette`) && PathPrefix(`/carotte`)",
|
Rule: "Host(`traefik.courgette`) && PathPrefix(`/carotte`)",
|
||||||
Service: "testing/service2/8082",
|
Service: "testing-service2-8082",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -374,7 +374,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"testing/service2/8082": {
|
"testing-service2-8082": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -451,13 +451,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -481,13 +481,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/tchouk",
|
Service: "testing-service1-tchouk",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/tchouk": {
|
"testing-service1-tchouk": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -511,13 +511,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/tchouk",
|
Service: "testing-service1-tchouk",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/tchouk": {
|
"testing-service1-tchouk": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -541,17 +541,17 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/tchouk",
|
Service: "testing-service1-tchouk",
|
||||||
},
|
},
|
||||||
"traefik-tchouk/foo": {
|
"traefik-tchouk-foo": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/foo`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/foo`)",
|
||||||
Service: "testing/service1/carotte",
|
Service: "testing-service1-carotte",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/tchouk": {
|
"testing-service1-tchouk": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -564,7 +564,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"testing/service1/carotte": {
|
"testing-service1-carotte": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -588,17 +588,17 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/tchouk",
|
Service: "testing-service1-tchouk",
|
||||||
},
|
},
|
||||||
"toto-traefik-tchouk/bar": {
|
"toto-traefik-tchouk-bar": {
|
||||||
Rule: "Host(`toto.traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`toto.traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "toto/service1/tchouk",
|
Service: "toto-service1-tchouk",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/tchouk": {
|
"testing-service1-tchouk": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -611,7 +611,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"toto/service1/tchouk": {
|
"toto-service1-tchouk": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -657,13 +657,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"traefik-tchouk/bar": {
|
"traefik-tchouk-bar": {
|
||||||
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/8080",
|
Service: "testing-service1-8080",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/8080": {
|
"testing-service1-8080": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -686,16 +686,16 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"example-com": {
|
"example-com": {
|
||||||
Rule: "Host(`example.com`)",
|
Rule: "Host(`example.com`)",
|
||||||
Service: "testing/example-com/80",
|
Service: "testing-example-com-80",
|
||||||
},
|
},
|
||||||
"example-com-tls": {
|
"example-com-tls": {
|
||||||
Rule: "Host(`example.com`)",
|
Rule: "Host(`example.com`)",
|
||||||
Service: "testing/example-com/80",
|
Service: "testing-example-com-80",
|
||||||
TLS: &dynamic.RouterTLSConfig{},
|
TLS: &dynamic.RouterTLSConfig{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/example-com/80": {
|
"testing-example-com-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -726,13 +726,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"/bar": {
|
"bar": {
|
||||||
Rule: "PathPrefix(`/bar`)",
|
Rule: "PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/443",
|
Service: "testing-service1-443",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/443": {
|
"testing-service1-443": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -756,13 +756,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"/bar": {
|
"bar": {
|
||||||
Rule: "PathPrefix(`/bar`)",
|
Rule: "PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/8443",
|
Service: "testing-service1-8443",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/8443": {
|
"testing-service1-8443": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -787,13 +787,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
|
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"/bar": {
|
"bar": {
|
||||||
Rule: "PathPrefix(`/bar`)",
|
Rule: "PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/8443",
|
Service: "testing-service1-8443",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/8443": {
|
"testing-service1-8443": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -848,13 +848,13 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
||||||
HTTP: &dynamic.HTTPConfiguration{
|
HTTP: &dynamic.HTTPConfiguration{
|
||||||
Middlewares: map[string]*dynamic.Middleware{},
|
Middlewares: map[string]*dynamic.Middleware{},
|
||||||
Routers: map[string]*dynamic.Router{
|
Routers: map[string]*dynamic.Router{
|
||||||
"/bar": {
|
"bar": {
|
||||||
Rule: "PathPrefix(`/bar`)",
|
Rule: "PathPrefix(`/bar`)",
|
||||||
Service: "testing/service1/80",
|
Service: "testing-service1-80",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Services: map[string]*dynamic.Service{
|
Services: map[string]*dynamic.Service{
|
||||||
"testing/service1/80": {
|
"testing-service1-80": {
|
||||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||||
PassHostHeader: true,
|
PassHostHeader: true,
|
||||||
Servers: []dynamic.Server{
|
Servers: []dynamic.Server{
|
||||||
|
@ -1088,13 +1088,13 @@ func TestGetTLS(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
result: map[string]*tls.CertAndStores{
|
result: map[string]*tls.CertAndStores{
|
||||||
"testing/test-secret": {
|
"testing-test-secret": {
|
||||||
Certificate: tls.Certificate{
|
Certificate: tls.Certificate{
|
||||||
CertFile: tls.FileOrContent("tls-crt"),
|
CertFile: tls.FileOrContent("tls-crt"),
|
||||||
KeyFile: tls.FileOrContent("tls-key"),
|
KeyFile: tls.FileOrContent("tls-key"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"testing/test-secret2": {
|
"testing-test-secret2": {
|
||||||
Certificate: tls.Certificate{
|
Certificate: tls.Certificate{
|
||||||
CertFile: tls.FileOrContent("tls-crt"),
|
CertFile: tls.FileOrContent("tls-crt"),
|
||||||
KeyFile: tls.FileOrContent("tls-key"),
|
KeyFile: tls.FileOrContent("tls-key"),
|
||||||
|
|
Loading…
Reference in a new issue