mirror of
https://github.com/yusing/godoxy.git
synced 2025-07-04 14:04:25 +02:00
fix: revert isExplicit checking
This commit is contained in:
parent
f762b3e637
commit
98777205a5
1 changed files with 9 additions and 8 deletions
|
@ -52,7 +52,15 @@ type (
|
||||||
var DummyContainer = new(Container)
|
var DummyContainer = new(Container)
|
||||||
|
|
||||||
func FromDocker(c *container.Summary, dockerHost string) (res *Container) {
|
func FromDocker(c *container.Summary, dockerHost string) (res *Container) {
|
||||||
isExplicit := false
|
var isExplicit bool
|
||||||
|
for lbl := range c.Labels {
|
||||||
|
if strings.HasPrefix(lbl, NSProxy+".") {
|
||||||
|
isExplicit = true
|
||||||
|
} else {
|
||||||
|
delete(c.Labels, lbl)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
helper := containerHelper{c}
|
helper := containerHelper{c}
|
||||||
res = &Container{
|
res = &Container{
|
||||||
DockerHost: dockerHost,
|
DockerHost: dockerHost,
|
||||||
|
@ -83,13 +91,6 @@ func FromDocker(c *container.Summary, dockerHost string) (res *Container) {
|
||||||
res.setPublicHostname()
|
res.setPublicHostname()
|
||||||
res.loadDeleteIdlewatcherLabels(helper)
|
res.loadDeleteIdlewatcherLabels(helper)
|
||||||
|
|
||||||
for lbl := range c.Labels {
|
|
||||||
if strings.HasPrefix(lbl, NSProxy+".") {
|
|
||||||
isExplicit = true
|
|
||||||
} else {
|
|
||||||
delete(c.Labels, lbl)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
res.RouteConfig = utils.FitMap(c.Labels)
|
res.RouteConfig = utils.FitMap(c.Labels)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue