Skip to content

Commit

Permalink
Missing Backend key in configuration when application has no tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
aantono authored and traefiker committed Nov 1, 2017
1 parent d3c7681 commit 02035d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion provider/marathon/marathon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ func TestMarathonLoadConfigNonAPIErrors(t *testing.T) {
},
},
},
expectedBackends: nil,
expectedBackends: map[string]*types.Backend{
"backend-app": {},
},
},
{
desc: "load balancer / circuit breaker labels",
Expand Down
1 change: 1 addition & 0 deletions templates/marathon.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

{{range $app := $apps}}
{{range $serviceIndex, $serviceName := getServiceNames $app}}
[backends."backend{{getBackend $app $serviceName }}"]
{{ if hasMaxConnLabels $app }}
[backends."backend{{getBackend $app $serviceName }}".maxconn]
amount = {{getMaxConnAmount $app }}
Expand Down

0 comments on commit 02035d4

Please sign in to comment.