payload: {"action":"created","issue":{"url":"https://api.github.com/repos/linkerd/linkerd/issues/2269","repository_url":"https://api.github.com/repos/linkerd/linkerd","labels_url":"https://api.github.com/repos/linkerd/linkerd/issues/2269/labels{/name}","comments_url":"https://api.github.com/repos/linkerd/linkerd/issues/2269/comments","events_url":"https://api.github.com/repos/linkerd/linkerd/issues/2269/events","html_url":"https://github.com/linkerd/linkerd/issues/2269","id":436408355,"node_id":"MDU6SXNzdWU0MzY0MDgzNTU=","number":2269,"title":"Return meta attached to consul service in consul namer response","user":{"login":"edio","id":787439,"node_id":"MDQ6VXNlcjc4NzQzOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/787439?v=4","gravatar_id":"","url":"https://api.github.com/users/edio","html_url":"https://github.com/edio","followers_url":"https://api.github.com/users/edio/followers","following_url":"https://api.github.com/users/edio/following{/other_user}","gists_url":"https://api.github.com/users/edio/gists{/gist_id}","starred_url":"https://api.github.com/users/edio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edio/subscriptions","organizations_url":"https://api.github.com/users/edio/orgs","repos_url":"https://api.github.com/users/edio/repos","events_url":"https://api.github.com/users/edio/events{/privacy}","received_events_url":"https://api.github.com/users/edio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-04-23T21:58:53Z","updated_at":"2019-04-25T21:34:38Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Issue Type:\r\n\r\n- [ ] Bug report\r\n- [x] Feature request\r\n\r\n**What happened**:\r\nService registered in consul with metadata attached\r\n```\r\n$ curl --request PUT --data '\\\r\n{\\\r\n\"ID\": \"foo-1\",\\\r\n\"Name\": \"foo\",\\\r\n\"Address\": \"10.10.10.10\",\\\r\n\"Port\": 10101,\\\r\n  \"Meta\": {\\\r\n    \"foo\": \"bar\"\\\r\n  },\\\r\n}' http://127.0.0.1:8500/v1/agent/service/register\r\n```\r\nWhen querying via namerd, metadata from consul isn't returned by the namer:\r\n```\r\n{\r\n\"type\": \"bound\",\r\n\"addrs\": [\r\n  {\r\n    \"ip\": \"10.10.10.10\",\r\n    \"port\": 10101,\r\n    \"meta\": {\r\n      \"endpoint_addr_weight\": 1\r\n    }\r\n  }\r\n],\r\n\"meta\": {}\r\n}\r\n```\r\n\r\n**What you expected to happen**:\r\nI'd expect `\"foo\": \"bar\"` meta attached to the consul service to be present in the namerd response.\r\n\r\n**Anything else we need to know?**:\r\nCurrently meta in consul namer response carries some finagle-specific data. We need to make sure, that metadata from consul can't clash with the meta-data namer already stores.\r\n"},"comment":{"url":"https://api.github.com/repos/linkerd/linkerd/issues/comments/486846291","html_url":"https://github.com/linkerd/linkerd/issues/2269#issuecomment-486846291","issue_url":"https://api.github.com/repos/linkerd/linkerd/issues/2269","id":486846291,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4Njg0NjI5MQ==","user":{"login":"edio","id":787439,"node_id":"MDQ6VXNlcjc4NzQzOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/787439?v=4","gravatar_id":"","url":"https://api.github.com/users/edio","html_url":"https://github.com/edio","followers_url":"https://api.github.com/users/edio/followers","following_url":"https://api.github.com/users/edio/following{/other_user}","gists_url":"https://api.github.com/users/edio/gists{/gist_id}","starred_url":"https://api.github.com/users/edio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edio/subscriptions","organizations_url":"https://api.github.com/users/edio/orgs","repos_url":"https://api.github.com/users/edio/repos","events_url":"https://api.github.com/users/edio/events{/privacy}","received_events_url":"https://api.github.com/users/edio/received_events","type":"User","site_admin":false},"created_at":"2019-04-25T21:34:38Z","updated_at":"2019-04-25T21:34:38Z","author_association":"CONTRIBUTOR","body":"@dadjeibaah , the main driver behind this was `ServiceMeta`, and actually, I think, right now consul namer doesn't write anything to `meta` field in response. So no issues with that.\r\n\r\nIf we, however are to add `NodeMeta`, which should be returned as `addrs[*].meta`, then we may have a collision.\r\n\r\nI haven't looked in details, but I see, that `Addr.Metadata` accepts pairs of `(String, Any)`. What if we write consul metadata as a map. So the resulting response would look like\r\n```\r\n{\r\n\"type\": \"bound\",\r\n\"addrs\": [\r\n  {\r\n    \"ip\": \"10.10.10.10\",\r\n    \"port\": 10101,\r\n    \"meta\": {\r\n      \"endpoint_addr_weight\": 1,\r\n      \"node_meta\": {\r\n        \"foo\": \"bar\"\r\n      }\r\n    }\r\n  }\r\n],\r\n\"meta\": {}\r\n}\r\n```\r\n(i.e. nested map)\r\n\r\nNot sure if this'll work, just the first idea, that comes to mind."}}
other: {"actor":{"display_login":"edio"}}