fix: default router name for k8s ingress.

This commit is contained in:
Ludovic Fernandez 2019-10-09 17:16:07 +02:00 committed by Traefiker Bot
parent 83de97e547
commit f2656e62dc
2 changed files with 3 additions and 3 deletions

View file

@ -294,7 +294,7 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl
continue continue
} }
conf.HTTP.Routers["/"] = &dynamic.Router{ conf.HTTP.Routers["default-router"] = &dynamic.Router{
Rule: "PathPrefix(`/`)", Rule: "PathPrefix(`/`)",
Priority: math.MinInt32, Priority: math.MinInt32,
Service: "default-backend", Service: "default-backend",

View file

@ -422,7 +422,7 @@ 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{
"/": { "default-router": {
Rule: "PathPrefix(`/`)", Rule: "PathPrefix(`/`)",
Service: "default-backend", Service: "default-backend",
Priority: math.MinInt32, Priority: math.MinInt32,
@ -819,7 +819,7 @@ 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{
"/": { "default-router": {
Rule: "PathPrefix(`/`)", Rule: "PathPrefix(`/`)",
Service: "default-backend", Service: "default-backend",
Priority: math.MinInt32, Priority: math.MinInt32,