mantl/mesos-consul

Comma-separated values for labels

gomes opened this issue · 1 comments

gomes commented

The problem: As a Mesos/Marathon user I would like to set a label containing config in consul and recover it using Traefik. Traefik supports comma-separated values, like traefik.frontend.entryPoints=http,https in https://docs.traefik.io/toml/#marathon-backend but mesos-consul replace it as
"ServiceTags": [
"traefik.frontend.entryPoints=http",
"https"
]
because of hard-coded comma in https://github.com/CiscoCloud/mesos-consul/blob/fa88da9f6ac102a281def5381790f399df2910d5/mesos/mesos.go#L88

Possible solutions:

  • Configurable separator, so I can use another symbol, like |
  • Support escaped comma, like gliderlabs/registrator#401 (they had the same problem)

I'm available to send a PR as soon some maintainer decides what is better for the project.

gnur commented

We are using traefik as well, for the time being have pointed traefik directly at marathon in stead of pointing it at consul.
The downside of this is that traefik picks up services before they become healthy, which results in some errors.