{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/helios/issues/370","labels_url":"https://api.github.com/repos/spotify/helios/issues/370/labels{/name}","comments_url":"https://api.github.com/repos/spotify/helios/issues/370/comments","events_url":"https://api.github.com/repos/spotify/helios/issues/370/events","html_url":"https://github.com/spotify/helios/pull/370","id":56913439,"number":370,"title":"Add support for tags in service registration ports","user":{"login":"carlanton","id":342897,"avatar_url":"https://avatars.githubusercontent.com/u/342897?v=3","gravatar_id":"","url":"https://api.github.com/users/carlanton","html_url":"https://github.com/carlanton","followers_url":"https://api.github.com/users/carlanton/followers","following_url":"https://api.github.com/users/carlanton/following{/other_user}","gists_url":"https://api.github.com/users/carlanton/gists{/gist_id}","starred_url":"https://api.github.com/users/carlanton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlanton/subscriptions","organizations_url":"https://api.github.com/users/carlanton/orgs","repos_url":"https://api.github.com/users/carlanton/repos","events_url":"https://api.github.com/users/carlanton/events{/privacy}","received_events_url":"https://api.github.com/users/carlanton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spotify/helios/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-07T14:46:06Z","updated_at":"2015-03-19T19:34:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spotify/helios/pulls/370","html_url":"https://github.com/spotify/helios/pull/370","diff_url":"https://github.com/spotify/helios/pull/370.diff","patch_url":"https://github.com/spotify/helios/pull/370.patch"},"body":"Context: #367 \r\n\r\nThis is one way to do it, don't now if there are better alternatives. In helios-consul we map a registered Helios port to a Consul service, so therefore I think it makes sense to add tags to the ports. I used the mysterious ServicePortParameters class for the tags, and then expose them to helios-consul through ServiceRegistration.Endpoint.\r\n\r\nA Helios job with \"port tags\" looks like this in this implementation:\r\n```\r\n{\r\n  \"ports\": {\r\n    \"my-port\": {\r\n      \"internalPort\": 8080,\r\n      \"protocol\": \"tcp\"\r\n    },\r\n    \"another-port\": {\r\n      \"internalPort\": 8081,\r\n      \"protocol\": \"tcp\"\r\n    }\r\n  },\r\n  \"registration\": {\r\n    \"redis/master\": {\r\n      \"ports\": {\r\n        \"my-port\": {\r\n          \"tags\": [\r\n            \"master\",\r\n            \"web-scale\"\r\n          ]\r\n        }\r\n      }\r\n    },\r\n    \"redis/slave\": {\r\n      \"ports\": {\r\n        \"my-port\": {\r\n          \"tags\": [\r\n            \"slave\",\r\n            \"web-scale\",\r\n            \"meh\"\r\n          ]\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/spotify/helios/issues/comments/83733357","html_url":"https://github.com/spotify/helios/pull/370#issuecomment-83733357","issue_url":"https://api.github.com/repos/spotify/helios/issues/370","id":83733357,"user":{"login":"rohansingh","id":615175,"avatar_url":"https://avatars.githubusercontent.com/u/615175?v=3","gravatar_id":"","url":"https://api.github.com/users/rohansingh","html_url":"https://github.com/rohansingh","followers_url":"https://api.github.com/users/rohansingh/followers","following_url":"https://api.github.com/users/rohansingh/following{/other_user}","gists_url":"https://api.github.com/users/rohansingh/gists{/gist_id}","starred_url":"https://api.github.com/users/rohansingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohansingh/subscriptions","organizations_url":"https://api.github.com/users/rohansingh/orgs","repos_url":"https://api.github.com/users/rohansingh/repos","events_url":"https://api.github.com/users/rohansingh/events{/privacy}","received_events_url":"https://api.github.com/users/rohansingh/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T19:34:24Z","updated_at":"2015-03-19T19:34:24Z","body":"Looks good to me and seems to pass all checks."}}