{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/84732658","pull_request_review_id":5491760,"id":84732658,"diff_hunk":"@@ -0,0 +1,204 @@\n+package controller\n+\n+import (\n+\t\"fmt\"\n+\t\"strings\"\n+\n+\t\"github.com/golang/glog\"\n+\tkapi \"k8s.io/kubernetes/pkg/api\"\n+\t\"k8s.io/kubernetes/pkg/util/sets\"\n+\t\"k8s.io/kubernetes/pkg/watch\"\n+\n+\trouteapi \"github.com/openshift/origin/pkg/route/api\"\n+\t\"github.com/openshift/origin/pkg/router\"\n+)\n+\n+// RouteAdmissionFunc determines whether or not to admit a route.\n+type RouteAdmissionFunc func(*routeapi.Route) error\n+\n+// SubdomainToRouteMap contains all routes associated with a subdomain -\n+// fully qualified and wildcard routes.\n+type SubdomainToRouteMap map[string][]*routeapi.Route\n+\n+// RemoveRoute removes any existing route(s) for a subdomain.\n+func (srm SubdomainToRouteMap) RemoveRoute(key string, route *routeapi.Route) bool {\n+\tk := 0\n+\tremoved := false\n+\n+\tm := srm[key]\n+\tfor i, v := range m {\n+\t\tif m[i].Namespace == route.Namespace && m[i].Name == route.Name {","path":"pkg/router/controller/host_admitter.go","position":30,"original_position":30,"commit_id":"7ab4f0f77d37b3512fe1c6053cfcb9237fdce7fc","original_commit_id":"7ab4f0f77d37b3512fe1c6053cfcb9237fdce7fc","user":{"login":"marun","id":451477,"avatar_url":"https://avatars.githubusercontent.com/u/451477?v=3","gravatar_id":"","url":"https://api.github.com/users/marun","html_url":"https://github.com/marun","followers_url":"https://api.github.com/users/marun/followers","following_url":"https://api.github.com/users/marun/following{/other_user}","gists_url":"https://api.github.com/users/marun/gists{/gist_id}","starred_url":"https://api.github.com/users/marun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marun/subscriptions","organizations_url":"https://api.github.com/users/marun/orgs","repos_url":"https://api.github.com/users/marun/repos","events_url":"https://api.github.com/users/marun/events{/privacy}","received_events_url":"https://api.github.com/users/marun/received_events","type":"User","site_admin":false},"body":"Is there a reason to key on the namespace and name instead of the UID?","created_at":"2016-10-24T16:57:23Z","updated_at":"2016-10-24T16:57:24Z","html_url":"https://github.com/openshift/origin/pull/11201#discussion_r84732658","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/11201","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/84732658"},"html":{"href":"https://github.com/openshift/origin/pull/11201#discussion_r84732658"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/11201"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/11201","id":87821265,"html_url":"https://github.com/openshift/origin/pull/11201","diff_url":"https://github.com/openshift/origin/pull/11201.diff","patch_url":"https://github.com/openshift/origin/pull/11201.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/11201","number":11201,"state":"closed","locked":false,"title":"Add router support for wildcard domains (*.foo.com)","user":{"login":"ramr","id":928868,"avatar_url":"https://avatars.githubusercontent.com/u/928868?v=3","gravatar_id":"","url":"https://api.github.com/users/ramr","html_url":"https://github.com/ramr","followers_url":"https://api.github.com/users/ramr/followers","following_url":"https://api.github.com/users/ramr/following{/other_user}","gists_url":"https://api.github.com/users/ramr/gists{/gist_id}","starred_url":"https://api.github.com/users/ramr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramr/subscriptions","organizations_url":"https://api.github.com/users/ramr/orgs","repos_url":"https://api.github.com/users/ramr/repos","events_url":"https://api.github.com/users/ramr/events{/privacy}","received_events_url":"https://api.github.com/users/ramr/received_events","type":"User","site_admin":false},"body":"For trello card: https://trello.com/c/cX42kXSA/222-7-subdomain-wildcard-router-ingress-demo\r\n\r\nStill need to beef up the tests + address route ownership/replacement (for wildcard to overlapping routes) but this has support for the card via an environment variable + allows a {white,black}listing of host names. The route ownership/replacement might make this PR a bit too big - its big enough as is.\r\n\r\n@knobunc @rajatchopra @marun @smarterclayton  if you have some preliminary feedback that would be greatly appreciated. Thx","created_at":"2016-10-04T01:38:32Z","updated_at":"2016-10-24T16:57:24Z","closed_at":"2016-10-21T20:22:11Z","merged_at":"2016-10-21T20:22:11Z","merge_commit_sha":"cfb1f76c74d88aea7a0b1be9334b98a25cd1a1e4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/11201/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/11201/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/11201/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/7ab4f0f77d37b3512fe1c6053cfcb9237fdce7fc","head":{"label":"ramr:wildcard-domain","ref":"wildcard-domain","sha":"7ab4f0f77d37b3512fe1c6053cfcb9237fdce7fc","user":{"login":"ramr","id":928868,"avatar_url":"https://avatars.githubusercontent.com/u/928868?v=3","gravatar_id":"","url":"https://api.github.com/users/ramr","html_url":"https://github.com/ramr","followers_url":"https://api.github.com/users/ramr/followers","following_url":"https://api.github.com/users/ramr/following{/other_user}","gists_url":"https://api.github.com/users/ramr/gists{/gist_id}","starred_url":"https://api.github.com/users/ramr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramr/subscriptions","organizations_url":"https://api.github.com/users/ramr/orgs","repos_url":"https://api.github.com/users/ramr/repos","events_url":"https://api.github.com/users/ramr/events{/privacy}","received_events_url":"https://api.github.com/users/ramr/received_events","type":"User","site_admin":false},"repo":{"id":31566423,"name":"origin","full_name":"ramr/origin","owner":{"login":"ramr","id":928868,"avatar_url":"https://avatars.githubusercontent.com/u/928868?v=3","gravatar_id":"","url":"https://api.github.com/users/ramr","html_url":"https://github.com/ramr","followers_url":"https://api.github.com/users/ramr/followers","following_url":"https://api.github.com/users/ramr/following{/other_user}","gists_url":"https://api.github.com/users/ramr/gists{/gist_id}","starred_url":"https://api.github.com/users/ramr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramr/subscriptions","organizations_url":"https://api.github.com/users/ramr/orgs","repos_url":"https://api.github.com/users/ramr/repos","events_url":"https://api.github.com/users/ramr/events{/privacy}","received_events_url":"https://api.github.com/users/ramr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ramr/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/ramr/origin","forks_url":"https://api.github.com/repos/ramr/origin/forks","keys_url":"https://api.github.com/repos/ramr/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ramr/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ramr/origin/teams","hooks_url":"https://api.github.com/repos/ramr/origin/hooks","issue_events_url":"https://api.github.com/repos/ramr/origin/issues/events{/number}","events_url":"https://api.github.com/repos/ramr/origin/events","assignees_url":"https://api.github.com/repos/ramr/origin/assignees{/user}","branches_url":"https://api.github.com/repos/ramr/origin/branches{/branch}","tags_url":"https://api.github.com/repos/ramr/origin/tags","blobs_url":"https://api.github.com/repos/ramr/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ramr/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ramr/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ramr/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ramr/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/ramr/origin/languages","stargazers_url":"https://api.github.com/repos/ramr/origin/stargazers","contributors_url":"https://api.github.com/repos/ramr/origin/contributors","subscribers_url":"https://api.github.com/repos/ramr/origin/subscribers","subscription_url":"https://api.github.com/repos/ramr/origin/subscription","commits_url":"https://api.github.com/repos/ramr/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ramr/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ramr/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ramr/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ramr/origin/contents/{+path}","compare_url":"https://api.github.com/repos/ramr/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ramr/origin/merges","archive_url":"https://api.github.com/repos/ramr/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ramr/origin/downloads","issues_url":"https://api.github.com/repos/ramr/origin/issues{/number}","pulls_url":"https://api.github.com/repos/ramr/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/ramr/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/ramr/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ramr/origin/labels{/name}","releases_url":"https://api.github.com/repos/ramr/origin/releases{/id}","deployments_url":"https://api.github.com/repos/ramr/origin/deployments","created_at":"2015-03-02T22:18:42Z","updated_at":"2016-01-21T01:51:05Z","pushed_at":"2016-10-21T00:37:12Z","git_url":"git://github.com/ramr/origin.git","ssh_url":"git@github.com:ramr/origin.git","clone_url":"https://github.com/ramr/origin.git","svn_url":"https://github.com/ramr/origin","homepage":"https://openshift.github.io","size":343734,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"4a1aec04c1adb3cc399e108aae766e0181c749db","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"Enterprise-Ready Kubernetes for Developers","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2016-10-24T16:31:47Z","pushed_at":"2016-10-24T16:31:18Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":601087,"stargazers_count":1874,"watchers_count":1874,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1261,"mirror_url":null,"open_issues_count":1193,"forks":1261,"open_issues":1193,"watchers":1874,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/11201"},"html":{"href":"https://github.com/openshift/origin/pull/11201"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/11201"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/11201/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/11201/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/11201/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/7ab4f0f77d37b3512fe1c6053cfcb9237fdce7fc"}}}}
{"actor":{"display_login":"marun"}}