mantl / mesos-consul

Mesos to Consul bridge for service discovery
Apache License 2.0
338 stars 95 forks source link

implement task-tag option #70

Closed atongen closed 8 years ago

atongen commented 8 years ago

This pull request provides a command-line option that allows us to specify a pattern and a tag. The option can be provided more than once. Tasks whose names contain the pattern (case-insensitive) will have their services tagged with the given tag. This is helpful if a mesos framework does not provide an easy way to pass in labels for tasks. For example, with spark, we can do something like this:

--task-tag=driver-for-spark:prometheus

then we can use the prometheus service tag in consul to perform other service discovery.