{"action":"closed","number":15845,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15845","id":48072942,"html_url":"https://github.com/kubernetes/kubernetes/pull/15845","diff_url":"https://github.com/kubernetes/kubernetes/pull/15845.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/15845.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15845","number":15845,"state":"closed","locked":false,"title":"Search for port number for service locator","user":{"login":"ddysher","id":2191361,"avatar_url":"https://avatars.githubusercontent.com/u/2191361?v=3","gravatar_id":"","url":"https://api.github.com/users/ddysher","html_url":"https://github.com/ddysher","followers_url":"https://api.github.com/users/ddysher/followers","following_url":"https://api.github.com/users/ddysher/following{/other_user}","gists_url":"https://api.github.com/users/ddysher/gists{/gist_id}","starred_url":"https://api.github.com/users/ddysher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddysher/subscriptions","organizations_url":"https://api.github.com/users/ddysher/orgs","repos_url":"https://api.github.com/users/ddysher/repos","events_url":"https://api.github.com/users/ddysher/events{/privacy}","received_events_url":"https://api.github.com/users/ddysher/received_events","type":"User","site_admin":false},"body":"If service port is created with name, then resouce locator will only look for port name, not port number.\r\n\r\nE.g. if I create a service like below:\r\n```\r\napiVersion: v1\r\nkind: Service\r\nmetadata:\r\n  name: appv1\r\nspec:\r\n  selector:\r\n    name: app\r\n    version: v1\r\n  ports:\r\n  - name: http\r\n    port: 80\r\n```\r\n\r\nThen using proxy, I can only access the service using:\r\n```\r\nhttps:/localhost:8000/api/v1/proxy/namespaces/default/services/appv1:http\r\n```\r\n\r\nI think using port number is sometimes more intuitive. With the changes in this PR, we can also do:\r\n```\r\nhttps:/localhost:8000/api/v1/proxy/namespaces/default/services/appv1:80\r\n```\r\n\r\nHowever, I'm not sure if this is consistent with other endpoints, i.e. port name takes precedence over port number, and if it exists, ignore port number.","created_at":"2015-10-19T13:43:15Z","updated_at":"2015-10-20T08:04:18Z","closed_at":"2015-10-20T08:04:18Z","merged_at":"2015-10-20T08:04:18Z","merge_commit_sha":"fd01b9c2c06abee4fe2a640c1cd0ac01e14de8a1","assignee":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15845/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15845/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15845/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/151e4b7cb8efe79ea35da40fd03d3a6a73551bfc","head":{"label":"ddysher:service-locator","ref":"service-locator","sha":"151e4b7cb8efe79ea35da40fd03d3a6a73551bfc","user":{"login":"ddysher","id":2191361,"avatar_url":"https://avatars.githubusercontent.com/u/2191361?v=3","gravatar_id":"","url":"https://api.github.com/users/ddysher","html_url":"https://github.com/ddysher","followers_url":"https://api.github.com/users/ddysher/followers","following_url":"https://api.github.com/users/ddysher/following{/other_user}","gists_url":"https://api.github.com/users/ddysher/gists{/gist_id}","starred_url":"https://api.github.com/users/ddysher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddysher/subscriptions","organizations_url":"https://api.github.com/users/ddysher/orgs","repos_url":"https://api.github.com/users/ddysher/repos","events_url":"https://api.github.com/users/ddysher/events{/privacy}","received_events_url":"https://api.github.com/users/ddysher/received_events","type":"User","site_admin":false},"repo":{"id":22863953,"name":"kubernetes","full_name":"ddysher/kubernetes","owner":{"login":"ddysher","id":2191361,"avatar_url":"https://avatars.githubusercontent.com/u/2191361?v=3","gravatar_id":"","url":"https://api.github.com/users/ddysher","html_url":"https://github.com/ddysher","followers_url":"https://api.github.com/users/ddysher/followers","following_url":"https://api.github.com/users/ddysher/following{/other_user}","gists_url":"https://api.github.com/users/ddysher/gists{/gist_id}","starred_url":"https://api.github.com/users/ddysher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddysher/subscriptions","organizations_url":"https://api.github.com/users/ddysher/orgs","repos_url":"https://api.github.com/users/ddysher/repos","events_url":"https://api.github.com/users/ddysher/events{/privacy}","received_events_url":"https://api.github.com/users/ddysher/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ddysher/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/ddysher/kubernetes","forks_url":"https://api.github.com/repos/ddysher/kubernetes/forks","keys_url":"https://api.github.com/repos/ddysher/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ddysher/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ddysher/kubernetes/teams","hooks_url":"https://api.github.com/repos/ddysher/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/ddysher/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/ddysher/kubernetes/events","assignees_url":"https://api.github.com/repos/ddysher/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/ddysher/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/ddysher/kubernetes/tags","blobs_url":"https://api.github.com/repos/ddysher/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ddysher/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ddysher/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ddysher/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ddysher/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/ddysher/kubernetes/languages","stargazers_url":"https://api.github.com/repos/ddysher/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/ddysher/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/ddysher/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/ddysher/kubernetes/subscription","commits_url":"https://api.github.com/repos/ddysher/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ddysher/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ddysher/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ddysher/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ddysher/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/ddysher/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ddysher/kubernetes/merges","archive_url":"https://api.github.com/repos/ddysher/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ddysher/kubernetes/downloads","issues_url":"https://api.github.com/repos/ddysher/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/ddysher/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/ddysher/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/ddysher/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ddysher/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/ddysher/kubernetes/releases{/id}","created_at":"2014-08-12T03:48:56Z","updated_at":"2014-08-15T00:25:36Z","pushed_at":"2015-10-19T13:27:30Z","git_url":"git://github.com/ddysher/kubernetes.git","ssh_url":"git@github.com:ddysher/kubernetes.git","clone_url":"https://github.com/ddysher/kubernetes.git","svn_url":"https://github.com/ddysher/kubernetes","homepage":null,"size":116067,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"kubernetes:master","ref":"master","sha":"77207d75e143f1a1fc289a5178d05fc043354ac6","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-10-20T07:57:18Z","pushed_at":"2015-10-20T08:04:18Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":476431,"stargazers_count":10782,"watchers_count":10782,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2733,"mirror_url":null,"open_issues_count":2073,"forks":2733,"open_issues":2073,"watchers":10782,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15845"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/15845"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/15845"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/15845/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15845/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15845/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/151e4b7cb8efe79ea35da40fd03d3a6a73551bfc"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars.githubusercontent.com/u/13653959?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"comments":11,"review_comments":0,"commits":1,"additions":21,"deletions":0,"changed_files":2}}