{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/79599278","id":79599278,"diff_hunk":"@@ -205,15 +205,22 @@ func mergeGroupVersionIntoMap(gvList string, dest map[string]unversioned.GroupVe\n }\n \n // Returns a clientset which can be used to talk to this apiserver.\n-func (s *ServerRunOptions) NewSelfClient() (clientset.Interface, error) {\n+func (s *ServerRunOptions) NewSelfClient(token string) (clientset.Interface, error) {\n \tclientConfig := &restclient.Config{\n-\t\tHost: net.JoinHostPort(s.InsecureBindAddress.String(), strconv.Itoa(s.InsecurePort)),\n \t\t// Increase QPS limits. The client is currently passed to all admission plugins,\n \t\t// and those can be throttled in case of higher load on apiserver - see #22340 and #22422\n \t\t// for more details. Once #22422 is fixed, we may want to remove it.\n \t\tQPS:   50,\n \t\tBurst: 100,\n \t}\n+\tif s.SecurePort > 0 {\n+\t\tclientConfig.Host = \"https://\" + net.JoinHostPort(s.BindAddress.String(), strconv.Itoa(s.SecurePort))\n+\t\tclientConfig.Insecure = true","path":"pkg/genericapiserver/options/server_run_options.go","position":16,"original_position":16,"commit_id":"ebe98310ec08c9fe9d218306d73c3ef925251d2a","original_commit_id":"ebe98310ec08c9fe9d218306d73c3ef925251d2a","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"This won't do.  Are we missing the information?  ","created_at":"2016-09-20T12:35:40Z","updated_at":"2016-09-20T12:38:42Z","html_url":"https://github.com/kubernetes/kubernetes/pull/31491#discussion_r79599278","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31491","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/79599278"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/31491#discussion_r79599278"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31491"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31491","id":82825847,"html_url":"https://github.com/kubernetes/kubernetes/pull/31491","diff_url":"https://github.com/kubernetes/kubernetes/pull/31491.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/31491.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/31491","number":31491,"state":"open","locked":false,"title":"Allow secure access to apiserver from Admission Controllers","user":{"login":"dims","id":23304,"avatar_url":"https://avatars.githubusercontent.com/u/23304?v=3","gravatar_id":"","url":"https://api.github.com/users/dims","html_url":"https://github.com/dims","followers_url":"https://api.github.com/users/dims/followers","following_url":"https://api.github.com/users/dims/following{/other_user}","gists_url":"https://api.github.com/users/dims/gists{/gist_id}","starred_url":"https://api.github.com/users/dims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dims/subscriptions","organizations_url":"https://api.github.com/users/dims/orgs","repos_url":"https://api.github.com/users/dims/repos","events_url":"https://api.github.com/users/dims/events{/privacy}","received_events_url":"https://api.github.com/users/dims/received_events","type":"User","site_admin":false},"body":"* Allow options.InsecurePort to be set to 0 to switch off insecure access\r\n* In NewSelfClient, Set the TLSClientConfig to the cert and key files\r\n  if InsecurePort is switched off\r\n* Mint a bearer token that allows the client(s) created in NewSelfClient\r\n  to talk to the api server\r\n* Add a new authenticator that checks for this specific bearer token\r\n\r\nFixes #13598\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/31491)\n<!-- Reviewable:end -->\n","created_at":"2016-08-26T03:08:52Z","updated_at":"2016-09-20T12:38:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d156b4c41f6aa17a24384067a525d31761ee394","assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"assignees":[{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31491/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31491/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/31491/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/ebe98310ec08c9fe9d218306d73c3ef925251d2a","head":{"label":"dims:fixes-issue-13598","ref":"fixes-issue-13598","sha":"ebe98310ec08c9fe9d218306d73c3ef925251d2a","user":{"login":"dims","id":23304,"avatar_url":"https://avatars.githubusercontent.com/u/23304?v=3","gravatar_id":"","url":"https://api.github.com/users/dims","html_url":"https://github.com/dims","followers_url":"https://api.github.com/users/dims/followers","following_url":"https://api.github.com/users/dims/following{/other_user}","gists_url":"https://api.github.com/users/dims/gists{/gist_id}","starred_url":"https://api.github.com/users/dims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dims/subscriptions","organizations_url":"https://api.github.com/users/dims/orgs","repos_url":"https://api.github.com/users/dims/repos","events_url":"https://api.github.com/users/dims/events{/privacy}","received_events_url":"https://api.github.com/users/dims/received_events","type":"User","site_admin":false},"repo":{"id":58837596,"name":"kubernetes","full_name":"dims/kubernetes","owner":{"login":"dims","id":23304,"avatar_url":"https://avatars.githubusercontent.com/u/23304?v=3","gravatar_id":"","url":"https://api.github.com/users/dims","html_url":"https://github.com/dims","followers_url":"https://api.github.com/users/dims/followers","following_url":"https://api.github.com/users/dims/following{/other_user}","gists_url":"https://api.github.com/users/dims/gists{/gist_id}","starred_url":"https://api.github.com/users/dims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dims/subscriptions","organizations_url":"https://api.github.com/users/dims/orgs","repos_url":"https://api.github.com/users/dims/repos","events_url":"https://api.github.com/users/dims/events{/privacy}","received_events_url":"https://api.github.com/users/dims/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dims/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/dims/kubernetes","forks_url":"https://api.github.com/repos/dims/kubernetes/forks","keys_url":"https://api.github.com/repos/dims/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dims/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dims/kubernetes/teams","hooks_url":"https://api.github.com/repos/dims/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/dims/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/dims/kubernetes/events","assignees_url":"https://api.github.com/repos/dims/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/dims/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/dims/kubernetes/tags","blobs_url":"https://api.github.com/repos/dims/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dims/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dims/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/dims/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dims/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/dims/kubernetes/languages","stargazers_url":"https://api.github.com/repos/dims/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/dims/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/dims/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/dims/kubernetes/subscription","commits_url":"https://api.github.com/repos/dims/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/dims/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/dims/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/dims/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/dims/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/dims/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dims/kubernetes/merges","archive_url":"https://api.github.com/repos/dims/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dims/kubernetes/downloads","issues_url":"https://api.github.com/repos/dims/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/dims/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/dims/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/dims/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dims/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/dims/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/dims/kubernetes/deployments","created_at":"2016-05-15T01:04:18Z","updated_at":"2016-05-15T01:04:33Z","pushed_at":"2016-09-20T12:38:00Z","git_url":"git://github.com/dims/kubernetes.git","ssh_url":"git@github.com:dims/kubernetes.git","clone_url":"https://github.com/dims/kubernetes.git","svn_url":"https://github.com/dims/kubernetes","homepage":"http://kubernetes.io","size":323225,"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":"30ff1f495a63b9d116534f701126e3156433a641","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":"Production-Grade Container Scheduling and Management","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}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-09-20T12:31:18Z","pushed_at":"2016-09-20T12:38:39Z","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":566590,"stargazers_count":16932,"watchers_count":16932,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5466,"mirror_url":null,"open_issues_count":4515,"forks":5466,"open_issues":4515,"watchers":16932,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31491"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/31491"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/31491"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/31491/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31491/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31491/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/ebe98310ec08c9fe9d218306d73c3ef925251d2a"}}}}
{"actor":{"display_login":"deads2k"}}