Add Support for Consul Connect

Co-authored-by: Florian Apolloner <apollo13@users.noreply.github.com>
This commit is contained in:
Mohammad Gufran 2021-07-15 17:32:11 +05:30 committed by GitHub
parent 3a180e2afc
commit 7e43e5615e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 2118 additions and 644 deletions

View file

@ -74,6 +74,7 @@ func TestDefaultRule(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -128,6 +129,7 @@ func TestDefaultRule(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -184,6 +186,7 @@ func TestDefaultRule(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -233,6 +236,7 @@ func TestDefaultRule(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -282,6 +286,7 @@ func TestDefaultRule(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -336,6 +341,7 @@ func TestDefaultRule(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -408,9 +414,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -447,9 +454,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -486,9 +494,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -542,6 +551,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -625,6 +635,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -699,6 +710,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -754,6 +766,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -811,6 +824,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -866,6 +880,7 @@ func Test_buildConfiguration(t *testing.T) {
Rule: "Host(`foo.com`)",
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -922,6 +937,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -984,6 +1000,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1040,6 +1057,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1102,8 +1120,9 @@ func Test_buildConfiguration(t *testing.T) {
Rule: "Host(`Test.traefik.wtf`)",
},
},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1185,8 +1204,9 @@ func Test_buildConfiguration(t *testing.T) {
Rule: "Host(`Test.traefik.wtf`)",
},
},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1265,6 +1285,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1326,6 +1347,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1410,6 +1432,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1488,6 +1511,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1588,6 +1612,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1661,6 +1686,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1756,6 +1782,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1834,6 +1861,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1912,6 +1940,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1967,6 +1996,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2023,6 +2053,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2084,6 +2115,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2116,9 +2148,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2153,9 +2186,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2192,9 +2226,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2230,9 +2265,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2270,9 +2306,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2329,6 +2366,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2395,6 +2433,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2456,9 +2495,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2513,9 +2553,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2567,9 +2608,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.TCPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2617,9 +2659,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2677,9 +2720,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2732,9 +2776,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.TCPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2834,6 +2879,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2880,9 +2926,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.TCPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2931,9 +2978,10 @@ func Test_buildConfiguration(t *testing.T) {
Services: map[string]*dynamic.UDPService{},
},
HTTP: &dynamic.HTTPConfiguration{
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
Routers: map[string]*dynamic.Router{},
Middlewares: map[string]*dynamic.Middleware{},
Services: map[string]*dynamic.Service{},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -2997,6 +3045,7 @@ func Test_buildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},