registrator
registrator copied to clipboard
Support for attrs and tags when using the SkyDNS backend
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.