1
0
Fork 0

Factorize labels

* refactor(accesslog): factorize file name.
* traefik.frontend.rule
* traefik.frontend.value
* traefik.backend.circuitbreaker.expression
* traefik.enable
* traefik.backend.loadbalancer.method
* traefik.backend.loadbalancer.sticky
* traefik.backend.maxconn.amount
* traefik.backend.maxconn.extractorfunc
* traefik.port
* traefik.tags
* traefik.backend
* traefik.weight
* traefik.domain
* traefik.protocol
* traefik.frontend.passHostHeader
* traefik.frontend.whitelistSourceRange
* traefik.frontend.priority
* traefik.frontend.entryPoints
* traefik.frontend.auth.basic
* traefik.backend.id
* traefik.backend.circuitbreaker
* traefik.frontend.rule.type
* traefik.portIndex
* refactor(docker): specific labels
* refactor(rancher): specific labels
* traefik.backend.healthcheck.*
* refactor(providers): factorize labels.
This commit is contained in:
Ludovic Fernandez 2017-07-10 16:58:12 +02:00 committed by SALLEYRON Julien
parent 2e84b1e556
commit d653a348b1
20 changed files with 390 additions and 330 deletions

View file

@ -10,13 +10,12 @@ import (
"github.com/containous/traefik/log"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
rancher "github.com/rancher/go-rancher/client"
)
var (
withoutPagination *rancher.ListOpts
)
const labelRancheStackServiceName = "io.rancher.stack_service.name"
var withoutPagination *rancher.ListOpts
// APIConfiguration contains configuration properties specific to the Rancher
// API provider.
@ -221,7 +220,7 @@ func parseAPISourcedRancherData(environments []*rancher.Project, services []*ran
}
for _, container := range containers {
if container.Labels["io.rancher.stack_service.name"] == rancherData.Name &&
if container.Labels[labelRancheStackServiceName] == rancherData.Name &&
containerFilter(container.Name, container.HealthState, container.State) {
rancherData.Containers = append(rancherData.Containers, container.PrimaryIpAddress)
}