Add scheme to IngressRoute.
This commit is contained in:
parent
39aae4167e
commit
c39aa5e857
38 changed files with 220 additions and 120 deletions
|
@ -45,14 +45,14 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -77,19 +77,19 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
expected: &config.Configuration{
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
},
|
||||
"default/test.crd-f44ce589164e656d231c": {
|
||||
"default/test.route-f44ce589164e656d231c": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-f44ce589164e656d231c",
|
||||
Service: "default/test.route-f44ce589164e656d231c",
|
||||
Rule: "HostSNI(`bar.com`)",
|
||||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
"default/test.crd-f44ce589164e656d231c": {
|
||||
"default/test.route-f44ce589164e656d231c": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -133,14 +133,14 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
expected: &config.Configuration{
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -236,15 +236,15 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
TLS: &config.RouterTCPTLSConfig{},
|
||||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -273,9 +273,9 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
expected: &config.Configuration{
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
TLS: &config.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
|
@ -283,7 +283,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -332,9 +332,9 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
TLS: &config.RouterTCPTLSConfig{
|
||||
Options: "default/foo",
|
||||
|
@ -342,7 +342,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -390,9 +390,9 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
TLS: &config.RouterTCPTLSConfig{
|
||||
Options: "myns/foo",
|
||||
|
@ -400,7 +400,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -447,9 +447,9 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
TLS: &config.RouterTCPTLSConfig{
|
||||
Options: "default/foo",
|
||||
|
@ -457,7 +457,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -493,9 +493,9 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
TLS: &config.RouterTCPTLSConfig{
|
||||
Options: "default/unknown",
|
||||
|
@ -503,7 +503,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -539,9 +539,9 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
TLS: &config.RouterTCPTLSConfig{
|
||||
Options: "unknown/foo",
|
||||
|
@ -549,7 +549,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -578,15 +578,15 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
expected: &config.Configuration{
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-fdd3e9338e47a45efefc",
|
||||
Service: "default/test.route-fdd3e9338e47a45efefc",
|
||||
Rule: "HostSNI(`foo.com`)",
|
||||
TLS: &config.RouterTCPTLSConfig{},
|
||||
},
|
||||
},
|
||||
Services: map[string]*config.TCPService{
|
||||
"default/test.crd-fdd3e9338e47a45efefc": {
|
||||
"default/test.route-fdd3e9338e47a45efefc": {
|
||||
LoadBalancer: &config.TCPLoadBalancerService{
|
||||
Servers: []config.TCPServer{
|
||||
{
|
||||
|
@ -661,16 +661,16 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -698,9 +698,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test2.crd-23c7f4c450289ee29016": {
|
||||
"default/test2.route-23c7f4c450289ee29016": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test2.crd-23c7f4c450289ee29016",
|
||||
Service: "default/test2.route-23c7f4c450289ee29016",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/tobestripped`)",
|
||||
Priority: 12,
|
||||
Middlewares: []string{"default/stripprefix", "foo/addprefix"},
|
||||
|
@ -719,7 +719,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test2.crd-23c7f4c450289ee29016": {
|
||||
"default/test2.route-23c7f4c450289ee29016": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -748,9 +748,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test2.crd-23c7f4c450289ee29016": {
|
||||
"default/test2.route-23c7f4c450289ee29016": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test2.crd-23c7f4c450289ee29016",
|
||||
Service: "default/test2.route-23c7f4c450289ee29016",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/tobestripped`)",
|
||||
Priority: 12,
|
||||
Middlewares: []string{"default/stripprefix", "foo/addprefix", "basicauth@file", "redirect@file"},
|
||||
|
@ -769,7 +769,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test2.crd-23c7f4c450289ee29016": {
|
||||
"default/test2.route-23c7f4c450289ee29016": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -796,22 +796,22 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Priority: 14,
|
||||
},
|
||||
"default/test.crd-77c62dfe9517144aeeaa": {
|
||||
"default/test.route-77c62dfe9517144aeeaa": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test.crd-77c62dfe9517144aeeaa",
|
||||
Service: "default/test.route-77c62dfe9517144aeeaa",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/foo`)",
|
||||
Priority: 12,
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -824,7 +824,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
PassHostHeader: true,
|
||||
},
|
||||
},
|
||||
"default/test.crd-77c62dfe9517144aeeaa": {
|
||||
"default/test.route-77c62dfe9517144aeeaa": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -853,16 +853,16 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-77c62dfe9517144aeeaa": {
|
||||
"default/test.route-77c62dfe9517144aeeaa": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test.crd-77c62dfe9517144aeeaa",
|
||||
Service: "default/test.route-77c62dfe9517144aeeaa",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/foo`)",
|
||||
Priority: 12,
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-77c62dfe9517144aeeaa": {
|
||||
"default/test.route-77c62dfe9517144aeeaa": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -970,9 +970,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
TLS: &config.RouterTLSConfig{},
|
||||
|
@ -980,7 +980,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -1026,9 +1026,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
TLS: &config.RouterTLSConfig{
|
||||
|
@ -1038,7 +1038,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -1084,9 +1084,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
TLS: &config.RouterTLSConfig{
|
||||
|
@ -1096,7 +1096,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -1141,9 +1141,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
TLS: &config.RouterTLSConfig{
|
||||
|
@ -1153,7 +1153,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -1187,9 +1187,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
TLS: &config.RouterTLSConfig{
|
||||
|
@ -1199,7 +1199,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -1233,9 +1233,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
TLS: &config.RouterTLSConfig{
|
||||
|
@ -1245,7 +1245,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -1273,9 +1273,9 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
TLS: &config.RouterTLSConfig{},
|
||||
|
@ -1283,7 +1283,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -1311,16 +1311,16 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.crd-6b204d94623b3df4370c",
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.crd-6b204d94623b3df4370c": {
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
|
@ -1337,6 +1337,43 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "Simple Ingress Route, explicit https scheme",
|
||||
paths: []string{"services.yml", "with_https_scheme.yml"},
|
||||
expected: &config.Configuration{
|
||||
TLS: &config.TLSConfiguration{},
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{},
|
||||
Services: map[string]*config.TCPService{},
|
||||
},
|
||||
HTTP: &config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
EntryPoints: []string{"foo"},
|
||||
Service: "default/test.route-6b204d94623b3df4370c",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/bar`)",
|
||||
Priority: 12,
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*config.Middleware{},
|
||||
Services: map[string]*config.Service{
|
||||
"default/test.route-6b204d94623b3df4370c": {
|
||||
LoadBalancer: &config.LoadBalancerService{
|
||||
Servers: []config.Server{
|
||||
{
|
||||
URL: "https://10.10.0.7:8443",
|
||||
},
|
||||
{
|
||||
URL: "https://10.10.0.8:8443",
|
||||
},
|
||||
},
|
||||
PassHostHeader: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "port selected by name (TODO)",
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue