Add Traefik Hub Integration (Experimental Feature)
This commit is contained in:
parent
8d58f33a28
commit
fbdb6e6e78
20 changed files with 992 additions and 11 deletions
|
@ -26,6 +26,7 @@ type features struct {
|
|||
Tracing string `json:"tracing"`
|
||||
Metrics string `json:"metrics"`
|
||||
AccessLog bool `json:"accessLog"`
|
||||
Hub bool `json:"hub"`
|
||||
// TODO add certificates resolvers
|
||||
}
|
||||
|
||||
|
@ -247,6 +248,7 @@ func getFeatures(conf static.Configuration) features {
|
|||
Tracing: getTracing(conf),
|
||||
Metrics: getMetrics(conf),
|
||||
AccessLog: conf.AccessLog != nil,
|
||||
Hub: conf.Hub != nil,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
"github.com/traefik/traefik/v2/pkg/config/static"
|
||||
"github.com/traefik/traefik/v2/pkg/provider/docker"
|
||||
"github.com/traefik/traefik/v2/pkg/provider/file"
|
||||
"github.com/traefik/traefik/v2/pkg/provider/hub"
|
||||
"github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd"
|
||||
"github.com/traefik/traefik/v2/pkg/provider/kubernetes/ingress"
|
||||
"github.com/traefik/traefik/v2/pkg/provider/marathon"
|
||||
|
@ -265,6 +266,7 @@ func TestHandler_Overview(t *testing.T) {
|
|||
Tracing: &static.Tracing{
|
||||
Jaeger: &jaeger.Config{},
|
||||
},
|
||||
Hub: &hub.Provider{},
|
||||
},
|
||||
confDyn: runtime.Configuration{},
|
||||
expected: expected{
|
||||
|
|
5
pkg/api/testdata/overview-dynamic.json
vendored
5
pkg/api/testdata/overview-dynamic.json
vendored
|
@ -2,7 +2,8 @@
|
|||
"features": {
|
||||
"accessLog": false,
|
||||
"metrics": "",
|
||||
"tracing": ""
|
||||
"tracing": "",
|
||||
"hub": false
|
||||
},
|
||||
"http": {
|
||||
"middlewares": {
|
||||
|
@ -50,4 +51,4 @@
|
|||
"warnings": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
5
pkg/api/testdata/overview-empty.json
vendored
5
pkg/api/testdata/overview-empty.json
vendored
|
@ -2,7 +2,8 @@
|
|||
"features": {
|
||||
"accessLog": false,
|
||||
"metrics": "",
|
||||
"tracing": ""
|
||||
"tracing": "",
|
||||
"hub": false
|
||||
},
|
||||
"http": {
|
||||
"middlewares": {
|
||||
|
@ -50,4 +51,4 @@
|
|||
"warnings": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
5
pkg/api/testdata/overview-features.json
vendored
5
pkg/api/testdata/overview-features.json
vendored
|
@ -2,7 +2,8 @@
|
|||
"features": {
|
||||
"accessLog": false,
|
||||
"metrics": "Prometheus",
|
||||
"tracing": "Jaeger"
|
||||
"tracing": "Jaeger",
|
||||
"hub": true
|
||||
},
|
||||
"http": {
|
||||
"middlewares": {
|
||||
|
@ -50,4 +51,4 @@
|
|||
"warnings": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
5
pkg/api/testdata/overview-providers.json
vendored
5
pkg/api/testdata/overview-providers.json
vendored
|
@ -2,7 +2,8 @@
|
|||
"features": {
|
||||
"accessLog": false,
|
||||
"metrics": "",
|
||||
"tracing": ""
|
||||
"tracing": "",
|
||||
"hub": false
|
||||
},
|
||||
"http": {
|
||||
"middlewares": {
|
||||
|
@ -60,4 +61,4 @@
|
|||
"warnings": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue