fix: backend name for stateful service.
This commit is contained in:
parent
2641832304
commit
29e1e9eef2
3 changed files with 13 additions and 11 deletions
16
vendor/github.com/containous/traefik-extra-service-fabric/servicefabric_tmpl.go
generated
vendored
16
vendor/github.com/containous/traefik-extra-service-fabric/servicefabric_tmpl.go
generated
vendored
|
@ -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}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue