From f2656e62dc94241fd9e0b9915c86d2e741f3482f Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Wed, 9 Oct 2019 17:16:07 +0200 Subject: [PATCH] fix: default router name for k8s ingress. --- pkg/provider/kubernetes/ingress/kubernetes.go | 2 +- pkg/provider/kubernetes/ingress/kubernetes_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/provider/kubernetes/ingress/kubernetes.go b/pkg/provider/kubernetes/ingress/kubernetes.go index 44e50cbd8..863711cce 100644 --- a/pkg/provider/kubernetes/ingress/kubernetes.go +++ b/pkg/provider/kubernetes/ingress/kubernetes.go @@ -294,7 +294,7 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl continue } - conf.HTTP.Routers["/"] = &dynamic.Router{ + conf.HTTP.Routers["default-router"] = &dynamic.Router{ Rule: "PathPrefix(`/`)", Priority: math.MinInt32, Service: "default-backend", diff --git a/pkg/provider/kubernetes/ingress/kubernetes_test.go b/pkg/provider/kubernetes/ingress/kubernetes_test.go index 76c02240d..a75c4356d 100644 --- a/pkg/provider/kubernetes/ingress/kubernetes_test.go +++ b/pkg/provider/kubernetes/ingress/kubernetes_test.go @@ -422,7 +422,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { HTTP: &dynamic.HTTPConfiguration{ Middlewares: map[string]*dynamic.Middleware{}, Routers: map[string]*dynamic.Router{ - "/": { + "default-router": { Rule: "PathPrefix(`/`)", Service: "default-backend", Priority: math.MinInt32, @@ -819,7 +819,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { HTTP: &dynamic.HTTPConfiguration{ Middlewares: map[string]*dynamic.Middleware{}, Routers: map[string]*dynamic.Router{ - "/": { + "default-router": { Rule: "PathPrefix(`/`)", Service: "default-backend", Priority: math.MinInt32,