registrator icon indicating copy to clipboard operation
registrator copied to clipboard

Support for attrs and tags when using the SkyDNS backend

Open jotunskij opened this issue 8 years ago • 0 comments

The documentation states that etcd does not support tags and attributes, but since the SkyDNS backend for Registrator is already writing the host and port as a json object, I thought I might as well complement that with the attrs and tags. The format of the written value is now:

{
  "host" : "10.0.1.5",
  "port" : "27439",
  "tags" : [ "tag1", "tag2" ],
  "attrs": [
    {
      "key" : "attr1",
      "value" : "attr_value1"
    },
    {
      "key" : "attr2",
      "value" : "attr2_value"
  ]
}

If no tags or attrs are provided, no values are written to etcd.

jotunskij avatar Apr 05 '16 12:04 jotunskij