mirror of
https://github.com/traefik/traefik.git
synced 2025-12-16 15: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
|
||||
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)
|
||||
}
|
||||
|
||||
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 {
|
||||
if netNotFound {
|
||||
logger.Warn().Msgf("Defaulting to first available network (%q) for container %q.", network, container.Name)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user