{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/117976784","pull_request_review_id":39725710,"id":117976784,"diff_hunk":"@@ -0,0 +1,129 @@\n+package controller\n+\n+import (\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\n+\t\"github.com/golang/glog\"\n+\n+\t\"k8s.io/client-go/util/cert\"\n+\tkapiv1 \"k8s.io/kubernetes/pkg/api/v1\"\n+\tsacontroller \"k8s.io/kubernetes/pkg/controller/serviceaccount\"\n+\t\"k8s.io/kubernetes/pkg/serviceaccount\"\n+\n+\tconfigapi \"github.com/openshift/origin/pkg/cmd/server/api\"\n+\t\"github.com/openshift/origin/pkg/cmd/server/bootstrappolicy\"\n+\t\"github.com/openshift/origin/pkg/cmd/server/crypto\"\n+\tserviceaccountcontrollers \"github.com/openshift/origin/pkg/serviceaccounts/controllers\"\n+)\n+\n+type ServiceAccountControllerOptions struct {\n+\tManagedNames []string\n+}\n+\n+func (c *ServiceAccountControllerOptions) RunController(ctx ControllerContext) (bool, error) {\n+\tif len(c.ManagedNames) == 0 {\n+\t\treturn true, fmt.Errorf(\"skipped starting Service Account Manager, no managed names specified\")\n+\t}\n+\n+\toptions := sacontroller.DefaultServiceAccountsControllerOptions()\n+\toptions.ServiceAccounts = []kapiv1.ServiceAccount{}\n+\n+\tfor _, saName := range c.ManagedNames {\n+\t\tsa := kapiv1.ServiceAccount{}\n+\t\tsa.Name = saName\n+\n+\t\toptions.ServiceAccounts = append(options.ServiceAccounts, sa)\n+\t}\n+\n+\t//REBASE: add new args to NewServiceAccountsController\n+\tgo sacontroller.NewServiceAccountsController(\n+\t\tctx.DeprecatedOpenshiftInformers.KubernetesInformers().Core().V1().ServiceAccounts(),\n+\t\tctx.DeprecatedOpenshiftInformers.KubernetesInformers().Core().V1().Namespaces(),\n+\t\tctx.ClientBuilder.ClientOrDie(bootstrappolicy.InfraServiceAccountControllerServiceAccountName),\n+\t\toptions).Run(1, ctx.Stop)\n+\n+\treturn true, nil\n+}\n+\n+type ServiceAccountTokensControllerOptions struct {\n+\tServiceAccountConfig     configapi.ServiceAccountConfig\n+\tServiceServingCertConfig configapi.ServiceServingCert","path":"pkg/cmd/server/origin/controller/serviceaccount.go","position":51,"original_position":51,"commit_id":"c8ea7e1c05b139c35d0567b79a946d963da58a6e","original_commit_id":"c8ea7e1c05b139c35d0567b79a946d963da58a6e","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars3.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":"Only the CA file contents please.  `[]byte`","created_at":"2017-05-23T12:29:36Z","updated_at":"2017-05-23T12:29:36Z","html_url":"https://github.com/openshift/origin/pull/14293#discussion_r117976784","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/14293","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/117976784"},"html":{"href":"https://github.com/openshift/origin/pull/14293#discussion_r117976784"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/14293"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/14293","id":121966251,"html_url":"https://github.com/openshift/origin/pull/14293","diff_url":"https://github.com/openshift/origin/pull/14293.diff","patch_url":"https://github.com/openshift/origin/pull/14293.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/14293","number":14293,"state":"open","locked":false,"title":"WIP: Refactor controller initialization","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars1.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"body":"This is a follow up what started in https://github.com/openshift/origin/pull/13996 and is tracked here: https://trello.com/c/ZtOfFpFz/907-5-use-kubernetes-controller-roles\r\n\r\nIn a nutshell:\r\n\r\n* We are switching to upstream RBAC roles for upstream controllers (should be already done)\r\n* We are switching to new initialization of origin controllers (this PR)","created_at":"2017-05-23T10:41:23Z","updated_at":"2017-05-23T12:29:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b95bb9f5853366beb32932433958df861bfb7569","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/14293/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/14293/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/14293/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/c8ea7e1c05b139c35d0567b79a946d963da58a6e","head":{"label":"mfojtik:controller-init","ref":"controller-init","sha":"c8ea7e1c05b139c35d0567b79a946d963da58a6e","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars1.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"repo":{"id":22954249,"name":"origin","full_name":"mfojtik/origin","owner":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars1.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mfojtik/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/mfojtik/origin","forks_url":"https://api.github.com/repos/mfojtik/origin/forks","keys_url":"https://api.github.com/repos/mfojtik/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mfojtik/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mfojtik/origin/teams","hooks_url":"https://api.github.com/repos/mfojtik/origin/hooks","issue_events_url":"https://api.github.com/repos/mfojtik/origin/issues/events{/number}","events_url":"https://api.github.com/repos/mfojtik/origin/events","assignees_url":"https://api.github.com/repos/mfojtik/origin/assignees{/user}","branches_url":"https://api.github.com/repos/mfojtik/origin/branches{/branch}","tags_url":"https://api.github.com/repos/mfojtik/origin/tags","blobs_url":"https://api.github.com/repos/mfojtik/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mfojtik/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mfojtik/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/mfojtik/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mfojtik/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/mfojtik/origin/languages","stargazers_url":"https://api.github.com/repos/mfojtik/origin/stargazers","contributors_url":"https://api.github.com/repos/mfojtik/origin/contributors","subscribers_url":"https://api.github.com/repos/mfojtik/origin/subscribers","subscription_url":"https://api.github.com/repos/mfojtik/origin/subscription","commits_url":"https://api.github.com/repos/mfojtik/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/mfojtik/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/mfojtik/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/mfojtik/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/mfojtik/origin/contents/{+path}","compare_url":"https://api.github.com/repos/mfojtik/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mfojtik/origin/merges","archive_url":"https://api.github.com/repos/mfojtik/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mfojtik/origin/downloads","issues_url":"https://api.github.com/repos/mfojtik/origin/issues{/number}","pulls_url":"https://api.github.com/repos/mfojtik/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/mfojtik/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/mfojtik/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mfojtik/origin/labels{/name}","releases_url":"https://api.github.com/repos/mfojtik/origin/releases{/id}","deployments_url":"https://api.github.com/repos/mfojtik/origin/deployments","created_at":"2014-08-14T13:11:47Z","updated_at":"2016-01-12T09:38:06Z","pushed_at":"2017-05-23T12:00:29Z","git_url":"git://github.com/mfojtik/origin.git","ssh_url":"git@github.com:mfojtik/origin.git","clone_url":"https://github.com/mfojtik/origin.git","svn_url":"https://github.com/mfojtik/origin","homepage":"https://openshift.github.io","size":607097,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"662086ed811dd166e5025c288d6aee66b88b3311","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars0.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://avatars0.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 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":"2017-05-23T10:34:49Z","pushed_at":"2017-05-23T12:21:46Z","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":617355,"stargazers_count":2844,"watchers_count":2844,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1892,"mirror_url":null,"open_issues_count":1286,"forks":1892,"open_issues":1286,"watchers":2844,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/14293"},"html":{"href":"https://github.com/openshift/origin/pull/14293"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/14293"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/14293/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/14293/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/14293/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/c8ea7e1c05b139c35d0567b79a946d963da58a6e"}}}}
{"actor":{"display_login":"deads2k"}}