mirror of
https://github.com/traefik/traefik.git
synced 2025-12-18 16:01:21 +01:00
Do not warn network missing if connected to a container network
This commit is contained in:
parent
9ee0e43eac
commit
79fde2b6dd
@ -340,7 +340,6 @@ func (p *DynConfBuilder) getIPAddress(ctx context.Context, container dockerData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
netNotFound = true
|
netNotFound = true
|
||||||
logger.Warn().Msgf("Could not find network named %q for container %q. Maybe you're missing the project's prefix in the label?", container.ExtraConf.Network, container.Name)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,6 +381,9 @@ func (p *DynConfBuilder) getIPAddress(ctx context.Context, container dockerData)
|
|||||||
return p.getIPAddress(ctx, containerParsed)
|
return p.getIPAddress(ctx, containerParsed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if netNotFound {
|
||||||
|
logger.Warn().Msgf("Could not find network named %q for container %q. Maybe you're missing the project's prefix in the label?", container.ExtraConf.Network, container.Name)
|
||||||
|
}
|
||||||
for _, network := range container.NetworkSettings.Networks {
|
for _, network := range container.NetworkSettings.Networks {
|
||||||
if netNotFound {
|
if netNotFound {
|
||||||
logger.Warn().Msgf("Defaulting to first available network (%q) for container %q.", network, container.Name)
|
logger.Warn().Msgf("Defaulting to first available network (%q) for container %q.", network, container.Name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user