Do not warn network missing if connected to a container network
This commit is contained in:
parent
9ee0e43eac
commit
79fde2b6dd
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue