{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/46599448","id":46599448,"diff_hunk":"@@ -477,7 +479,8 @@ func RunCmdRouter(f *clientcmd.Factory, cmd *cobra.Command, out io.Writer, cfg *\n \t\t\treturn fmt.Errorf(\"router could not be created; you must specify a service account with --service-account\")\n \t\t}\n \n-\t\terr := validateServiceAccount(kClient, namespace, cfg.ServiceAccount)\n+\t\tvar err error\n+\t\taccountExists, needsSCC, err = validateServiceAccount(kClient, namespace, cfg.ServiceAccount, cfg.HostNetwork)","path":"pkg/cmd/admin/router/router.go","position":28,"original_position":28,"commit_id":"d1134ad30a813f52c75d57cf2b9cafced219343d","original_commit_id":"d1134ad30a813f52c75d57cf2b9cafced219343d","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":"It would but I didn't see them used outside the scope of the `if generate {` code  block. \r\nYou would need to remove that outer assignment to `accountExists, needsSCC := false, false` (should catch an unused error I think).  Or did I read this wrong?","created_at":"2015-12-03T19:35:20Z","updated_at":"2015-12-03T19:35:20Z","html_url":"https://github.com/openshift/origin/pull/5265#discussion_r46599448","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/5265","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/46599448"},"html":{"href":"https://github.com/openshift/origin/pull/5265#discussion_r46599448"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/5265"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/5265","id":48249037,"html_url":"https://github.com/openshift/origin/pull/5265","diff_url":"https://github.com/openshift/origin/pull/5265.diff","patch_url":"https://github.com/openshift/origin/pull/5265.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/5265","number":5265,"state":"open","locked":false,"title":"Auto-create router users as needed","user":{"login":"knobunc","id":10033853,"avatar_url":"https://avatars.githubusercontent.com/u/10033853?v=3","gravatar_id":"","url":"https://api.github.com/users/knobunc","html_url":"https://github.com/knobunc","followers_url":"https://api.github.com/users/knobunc/followers","following_url":"https://api.github.com/users/knobunc/following{/other_user}","gists_url":"https://api.github.com/users/knobunc/gists{/gist_id}","starred_url":"https://api.github.com/users/knobunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knobunc/subscriptions","organizations_url":"https://api.github.com/users/knobunc/orgs","repos_url":"https://api.github.com/users/knobunc/repos","events_url":"https://api.github.com/users/knobunc/events{/privacy}","received_events_url":"https://api.github.com/users/knobunc/received_events","type":"User","site_admin":false},"body":"Changed the code to:\r\n - Defaults to the service account 'router' when service account is not specified\r\n - Automatically creates the service account when it does not exist\r\n - If the router will bind to the host-network, then it tests to see if the service account has the AllowHostPorts security constraint. If it does not, it prints a warning to the user\r\n\r\nFixes issue https://github.com/openshift/origin/issues/4133","created_at":"2015-10-20T19:52:41Z","updated_at":"2015-12-03T19:35:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81a228a05aca7992ff0617973315f9490d24d7f3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/5265/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/5265/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/5265/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/d1134ad30a813f52c75d57cf2b9cafced219343d","head":{"label":"knobunc:router-user","ref":"router-user","sha":"d1134ad30a813f52c75d57cf2b9cafced219343d","user":{"login":"knobunc","id":10033853,"avatar_url":"https://avatars.githubusercontent.com/u/10033853?v=3","gravatar_id":"","url":"https://api.github.com/users/knobunc","html_url":"https://github.com/knobunc","followers_url":"https://api.github.com/users/knobunc/followers","following_url":"https://api.github.com/users/knobunc/following{/other_user}","gists_url":"https://api.github.com/users/knobunc/gists{/gist_id}","starred_url":"https://api.github.com/users/knobunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knobunc/subscriptions","organizations_url":"https://api.github.com/users/knobunc/orgs","repos_url":"https://api.github.com/users/knobunc/repos","events_url":"https://api.github.com/users/knobunc/events{/privacy}","received_events_url":"https://api.github.com/users/knobunc/received_events","type":"User","site_admin":false},"repo":{"id":44627365,"name":"origin","full_name":"knobunc/origin","owner":{"login":"knobunc","id":10033853,"avatar_url":"https://avatars.githubusercontent.com/u/10033853?v=3","gravatar_id":"","url":"https://api.github.com/users/knobunc","html_url":"https://github.com/knobunc","followers_url":"https://api.github.com/users/knobunc/followers","following_url":"https://api.github.com/users/knobunc/following{/other_user}","gists_url":"https://api.github.com/users/knobunc/gists{/gist_id}","starred_url":"https://api.github.com/users/knobunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knobunc/subscriptions","organizations_url":"https://api.github.com/users/knobunc/orgs","repos_url":"https://api.github.com/users/knobunc/repos","events_url":"https://api.github.com/users/knobunc/events{/privacy}","received_events_url":"https://api.github.com/users/knobunc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/knobunc/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/knobunc/origin","forks_url":"https://api.github.com/repos/knobunc/origin/forks","keys_url":"https://api.github.com/repos/knobunc/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/knobunc/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/knobunc/origin/teams","hooks_url":"https://api.github.com/repos/knobunc/origin/hooks","issue_events_url":"https://api.github.com/repos/knobunc/origin/issues/events{/number}","events_url":"https://api.github.com/repos/knobunc/origin/events","assignees_url":"https://api.github.com/repos/knobunc/origin/assignees{/user}","branches_url":"https://api.github.com/repos/knobunc/origin/branches{/branch}","tags_url":"https://api.github.com/repos/knobunc/origin/tags","blobs_url":"https://api.github.com/repos/knobunc/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/knobunc/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/knobunc/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/knobunc/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/knobunc/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/knobunc/origin/languages","stargazers_url":"https://api.github.com/repos/knobunc/origin/stargazers","contributors_url":"https://api.github.com/repos/knobunc/origin/contributors","subscribers_url":"https://api.github.com/repos/knobunc/origin/subscribers","subscription_url":"https://api.github.com/repos/knobunc/origin/subscription","commits_url":"https://api.github.com/repos/knobunc/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/knobunc/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/knobunc/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/knobunc/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/knobunc/origin/contents/{+path}","compare_url":"https://api.github.com/repos/knobunc/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/knobunc/origin/merges","archive_url":"https://api.github.com/repos/knobunc/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/knobunc/origin/downloads","issues_url":"https://api.github.com/repos/knobunc/origin/issues{/number}","pulls_url":"https://api.github.com/repos/knobunc/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/knobunc/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/knobunc/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/knobunc/origin/labels{/name}","releases_url":"https://api.github.com/repos/knobunc/origin/releases{/id}","created_at":"2015-10-20T18:42:18Z","updated_at":"2015-10-20T18:42:45Z","pushed_at":"2015-11-12T21:18:31Z","git_url":"git://github.com/knobunc/origin.git","ssh_url":"git@github.com:knobunc/origin.git","clone_url":"https://github.com/knobunc/origin.git","svn_url":"https://github.com/knobunc/origin","homepage":"http://www.openshift.org","size":178471,"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":"e41134b8f7641095ce8fc3991fe1d1742065f600","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":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","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}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-12-03T15:03:52Z","pushed_at":"2015-12-03T19:00:44Z","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":227074,"stargazers_count":849,"watchers_count":849,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":532,"mirror_url":null,"open_issues_count":711,"forks":532,"open_issues":711,"watchers":849,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/5265"},"html":{"href":"https://github.com/openshift/origin/pull/5265"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/5265"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/5265/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/5265/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/5265/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/d1134ad30a813f52c75d57cf2b9cafced219343d"}}}}