fix: use defaultEntryPoints when no entryPoint is defined in a TCPRouter
This commit is contained in:
parent
40f21f41e1
commit
6ae194934d
3 changed files with 36 additions and 7 deletions
|
@ -61,6 +61,12 @@ func mergeConfiguration(configurations dynamic.Configurations, defaultEntryPoint
|
|||
|
||||
if configuration.TCP != nil {
|
||||
for routerName, router := range configuration.TCP.Routers {
|
||||
if len(router.EntryPoints) == 0 {
|
||||
log.WithoutContext().
|
||||
WithField(log.RouterName, routerName).
|
||||
Debugf("No entryPoint defined for this TCP router, using the default one(s) instead: %+v", defaultEntryPoints)
|
||||
router.EntryPoints = defaultEntryPoints
|
||||
}
|
||||
conf.TCP.Routers[provider.MakeQualifiedName(pvd, routerName)] = router
|
||||
}
|
||||
for serviceName, service := range configuration.TCP.Services {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue