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

@ -73,6 +73,7 @@ func TestBuildConfiguration(t *testing.T) {
PassHostHeader: Bool(true),
}},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -95,9 +96,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -137,6 +139,7 @@ func TestBuildConfiguration(t *testing.T) {
PassHostHeader: Bool(true),
}},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -188,6 +191,7 @@ func TestBuildConfiguration(t *testing.T) {
PassHostHeader: Bool(true),
}},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -237,9 +241,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -292,6 +297,7 @@ func TestBuildConfiguration(t *testing.T) {
PassHostHeader: Bool(true),
}},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -352,6 +358,7 @@ func TestBuildConfiguration(t *testing.T) {
PassHostHeader: Bool(true),
}},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -407,6 +414,7 @@ func TestBuildConfiguration(t *testing.T) {
PassHostHeader: Bool(true),
}},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -451,6 +459,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -491,6 +500,7 @@ func TestBuildConfiguration(t *testing.T) {
PassHostHeader: Bool(true),
}},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -535,6 +545,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -577,6 +588,7 @@ func TestBuildConfiguration(t *testing.T) {
Rule: "Host(`foo.com`)",
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -620,6 +632,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -669,6 +682,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -708,8 +722,9 @@ func TestBuildConfiguration(t *testing.T) {
Rule: "Host(`app2.marathon.localhost`)",
},
},
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{},
},
},
},
@ -778,6 +793,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -840,6 +856,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -893,6 +910,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -943,6 +961,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -996,6 +1015,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1038,6 +1058,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1081,6 +1102,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1129,6 +1151,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1151,9 +1174,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1177,9 +1201,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1203,9 +1228,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1229,9 +1255,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1256,9 +1283,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1283,9 +1311,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1329,6 +1358,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1372,6 +1402,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1414,6 +1445,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1455,9 +1487,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1496,9 +1529,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1533,9 +1567,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1578,9 +1613,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1620,9 +1656,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1666,9 +1703,10 @@ func TestBuildConfiguration(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{},
},
},
},
@ -1731,6 +1769,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},
@ -1790,6 +1829,7 @@ func TestBuildConfiguration(t *testing.T) {
},
},
},
ServersTransports: map[string]*dynamic.ServersTransport{},
},
},
},