Marathon provider listener

This commit is contained in:
emile 2015-09-09 23:12:55 +02:00
parent 3dd168b465
commit 9c3e2c2edd
2 changed files with 3 additions and 3 deletions

View file

@ -31,7 +31,7 @@ var MarathonFuncMap = template.FuncMap{
return value return value
} }
} }
return strings.TrimPrefix(application.ID, "/") return application.ID
}, },
"replace": func(s1 string, s2 string, s3 string) string { "replace": func(s1 string, s2 string, s3 string) string {
return strings.Replace(s3, s1, s2, -1) return strings.Replace(s3, s1, s2, -1)

View file

@ -6,7 +6,7 @@
[routes]{{range .Applications}} [routes]{{range .Applications}}
[routes.route{{.ID | replace "/" "-"}}] [routes.route{{.ID | replace "/" "-"}}]
backend = "backend{{.ID | replace "/" "-"}}" backend = "backend{{.ID | replace "/" "-"}}"
[routes.route-{{getHost .}}.rules.rule-host-{{getHost .}}] [routes.route-{{getHost . | replace "/" "-"}}.rules.rule-host-{{getHost . | replace "/" "-"}}]
category = "Host" category = "Host"
value = "{{getHost .}}.{{$.Domain}}" value = "{{getHost . | replace "/" "-"}}.{{$.Domain}}"
{{end}} {{end}}