Merge branch v2.11 into v3.5
This commit is contained in:
commit
c2db9db1aa
30 changed files with 356 additions and 307 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
"net"
|
||||
"strings"
|
||||
|
||||
dockertypes "github.com/docker/docker/api/types"
|
||||
containertypes "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
|
@ -114,7 +114,7 @@ func (p *DynConfBuilder) buildTCPServiceConfiguration(ctx context.Context, conta
|
|||
}
|
||||
}
|
||||
|
||||
if container.Health != "" && container.Health != dockertypes.Healthy {
|
||||
if container.Health != "" && container.Health != containertypes.Healthy {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ func (p *DynConfBuilder) buildUDPServiceConfiguration(ctx context.Context, conta
|
|||
}
|
||||
}
|
||||
|
||||
if container.Health != "" && container.Health != dockertypes.Healthy {
|
||||
if container.Health != "" && container.Health != containertypes.Healthy {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ func (p *DynConfBuilder) buildServiceConfiguration(ctx context.Context, containe
|
|||
}
|
||||
}
|
||||
|
||||
if container.Health != "" && container.Health != dockertypes.Healthy {
|
||||
if container.Health != "" && container.Health != containertypes.Healthy {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ func (p *DynConfBuilder) keepContainer(ctx context.Context, container dockerData
|
|||
return false
|
||||
}
|
||||
|
||||
if !p.AllowEmptyServices && container.Health != "" && container.Health != dockertypes.Healthy {
|
||||
if !p.AllowEmptyServices && container.Health != "" && container.Health != containertypes.Healthy {
|
||||
logger.Debug().Msg("Filtering unhealthy or starting container")
|
||||
return false
|
||||
}
|
||||
|
|
@ -344,8 +344,8 @@ func (p *DynConfBuilder) getIPAddress(ctx context.Context, container dockerData)
|
|||
}
|
||||
|
||||
if container.NetworkSettings.NetworkMode.IsHost() {
|
||||
if container.Node != nil && container.Node.IPAddress != "" {
|
||||
return container.Node.IPAddress
|
||||
if container.NodeIP != "" {
|
||||
return container.NodeIP
|
||||
}
|
||||
if host, err := net.LookupHost("host.docker.internal"); err == nil {
|
||||
return host[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue