diff --git a/Gopkg.lock b/Gopkg.lock index 45cadb3f6..10595219c 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -232,8 +232,8 @@ [[projects]] name = "github.com/containous/traefik-extra-service-fabric" packages = ["."] - revision = "ca1fb57108293caad285b1c366b763f6c6ab71c9" - version = "v1.0.5" + revision = "dd5326f23d6e529aa327c10ce1f996079f5d7262" + version = "v1.0.6" [[projects]] name = "github.com/coreos/bbolt" @@ -1400,6 +1400,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "7994872ae2ae128f087243191120faabaac8a738140a5ca664422a8f709827ec" + inputs-digest = "2211d5f1d7b7137b83976ba0a92441ef7a80c8a858eabb7d9a5102d7b3dfbe4f" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 2b340a41f..8cd1eb06e 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -68,7 +68,7 @@ ignored = ["github.com/sirupsen/logrus"] [[constraint]] name = "github.com/containous/traefik-extra-service-fabric" - version = "1.0.5" + version = "1.0.6" [[constraint]] name = "github.com/coreos/go-systemd" diff --git a/vendor/github.com/containous/traefik-extra-service-fabric/servicefabric_tmpl.go b/vendor/github.com/containous/traefik-extra-service-fabric/servicefabric_tmpl.go index 74be5033d..89d1dcd0c 100644 --- a/vendor/github.com/containous/traefik-extra-service-fabric/servicefabric_tmpl.go +++ b/vendor/github.com/containous/traefik-extra-service-fabric/servicefabric_tmpl.go @@ -58,7 +58,7 @@ const tmpl = ` {{range $replica := $partition.Replicas}} {{if isPrimary $replica}} - {{$backendName := getBackendName $service.Name $partition}} + {{$backendName := getBackendName $service $partition}} [backends."{{$backendName}}".servers."{{$replica.ID}}"] url = "{{getDefaultEndpoint $replica}}" weight = 1 @@ -126,13 +126,15 @@ const tmpl = ` {{range $partition := $service.Partitions}} {{$partitionId := $partition.PartitionInformation.ID}} - {{if hasLabel $service "frontend.rule"}} - [frontends."{{$service.Name}}/{{$partitionId}}"] - backend = "{{getBackendName $service.Name $partition}}" - [frontends."{{$service.Name}}/{{$partitionId}}".routes.default] - rule = {{getLabelValue $service "frontend.rule.partition.$partitionId" ""}} + {{ $rule := getLabelValue $service (print "frontend.rule.partition." $partitionId) "" }} + {{if $rule }} + [frontends."{{ $service.Name }}/{{ $partitionId }}"] + backend = "{{ getBackendName $service $partition }}" + + [frontends."{{ $service.Name }}/{{ $partitionId }}".routes.default] + rule = "{{ $rule }}" + {{end}} - {{end}} {{end}} {{end}} {{end}}