gliderlabs / registrator

Service registry bridge for Docker with pluggable adapters
http://gliderlabs.com/registrator
MIT License
4.66k stars 913 forks source link

Consul does not store custom attribute #404

Closed mateeyow closed 8 years ago

mateeyow commented 8 years ago

I tried running this command:

$ docker run -d --name redis.0 -p 10000:6379 \
    -l "SERVICE_NAME=db" \
    -l "SERVICE_TAGS=master,backups" \
    -l "SERVICE_REGION=us2" dockerfile/redis

From this example on your documentation. But it the attrs doesn't seem to show up on the consul. Here is the json from the consul catalog/service/db

[
   {
      "Node":"keystore",
      "Address":"172.17.0.2",
      "ServiceID":"hostname:redis.0:6379",
      "ServiceName":"db",
      "ServiceTags":[
         "master",
         "backups"
      ],
      "ServiceAddress":"",
      "ServicePort":10000
   }
]
nnordrum commented 8 years ago

Keep in mind not all of the Service object may be used by the registry backend. For example, currently none of them support registering arbitrary attributes. This field is there for future use.

I agree that should be called out more explicitly. Also, why aren't there issues in here for adding that functionality? We should at least be starting the conversations about how it gets supported in each backend.

zarlant commented 8 years ago

Initial PR added for this feature added here: https://github.com/gliderlabs/registrator/pull/444

josegonzalez commented 8 years ago

Closing as there is a pull request open.