{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/92456654","pull_request_review_id":12972708,"id":92456654,"diff_hunk":"@@ -150,28 +171,72 @@ func TestUpdateNewStyleSecret(t *testing.T) {\n \t\t}\n \t}\n \n-\tfoundSecret := false\n-\tfor _, action := range kubeclient.Actions() {\n-\t\tswitch {\n-\t\tcase action.Matches(\"update\", \"secrets\"):\n-\t\t\tupdateService := action.(core.UpdateAction)\n-\t\t\tsecret := updateService.GetObject().(*kapi.Secret)\n-\t\t\tactualDockercfg := &credentialprovider.DockerConfig{}\n-\t\t\tif err := json.Unmarshal(secret.Data[kapi.DockerConfigKey], actualDockercfg); err != nil {\n-\t\t\t\tt.Errorf(\"unexpected err %v\", err)\n-\t\t\t\tcontinue\n-\t\t\t}\n-\t\t\tif !reflect.DeepEqual(*actualDockercfg, expectedDockercfgMap) {\n-\t\t\t\tt.Errorf(\"expected %v, got %v\", expectedDockercfgMap, *actualDockercfg)\n-\t\t\t\tcontinue\n+\tcheckUpdatedSecrets := func() {\n+\t\tfoundSecret := false\n+\t\tdefer kubeclient.ClearActions()\n+\t\tfor _, action := range kubeclient.Actions() {\n+\t\t\tswitch {\n+\t\t\tcase action.Matches(\"update\", \"secrets\"):\n+\t\t\t\tupdateService := action.(core.UpdateAction)\n+\t\t\t\tsecret := updateService.GetObject().(*kapi.Secret)\n+\t\t\t\tactualDockercfg := &credentialprovider.DockerConfig{}\n+\t\t\t\tif err := json.Unmarshal(secret.Data[kapi.DockerConfigKey], actualDockercfg); err != nil {\n+\t\t\t\t\tt.Errorf(\"unexpected err %v\", err)\n+\t\t\t\t\tcontinue\n+\t\t\t\t}\n+\t\t\t\tif !reflect.DeepEqual(*actualDockercfg, expectedDockercfgMap) {","path":"pkg/serviceaccounts/controllers/docker_registry_service_test.go","position":111,"original_position":111,"commit_id":"e1e9c945cd1cea6dc7ed4adcfe80d0c642c69139","original_commit_id":"e1e9c945cd1cea6dc7ed4adcfe80d0c642c69139","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":"pass this as an arg.  I couldn't follow the code.","created_at":"2016-12-14T18:25:11Z","updated_at":"2016-12-14T18:25:11Z","html_url":"https://github.com/openshift/origin/pull/12244#discussion_r92456654","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/12244","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/92456654"},"html":{"href":"https://github.com/openshift/origin/pull/12244#discussion_r92456654"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/12244"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/12244","id":97732441,"html_url":"https://github.com/openshift/origin/pull/12244","diff_url":"https://github.com/openshift/origin/pull/12244.diff","patch_url":"https://github.com/openshift/origin/pull/12244.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/12244","number":12244,"state":"open","locked":false,"title":"Add credentials to SA for docker-registry exposed by a route","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.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":"If a docker-registry service is exposed by a route, this PR will make sure we generate the dockercfg automatically when that route is created or changed.\r\n\r\n```\r\n# run openshift with OPENSHIFT_DEFAULT_REGISTRY=registry.local:80\r\n$ oc expose service docker-registry --hostname=registry.local --as=system:admin\r\n```\r\n\r\nNow when pushing in build:\r\n\r\n```\r\nPushing image registry.local:80/test/ruby-ex:latest ...\r\n...\r\nPush successful\r\n```\r\n\r\nFixes: https://github.com/openshift/origin/issues/8581","created_at":"2016-12-13T11:28:25Z","updated_at":"2016-12-14T18:25:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dcddcc9247f5e295eaa8d34a7abde1dce1393a27","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/12244/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/12244/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/12244/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/e1e9c945cd1cea6dc7ed4adcfe80d0c642c69139","head":{"label":"mfojtik:registry_cluster_dns","ref":"registry_cluster_dns","sha":"e1e9c945cd1cea6dc7ed4adcfe80d0c642c69139","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.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://avatars.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":"2016-12-14T18:16:08Z","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":433452,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"04e71cae844a4eb8a207b2266841f1d42def07ab","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 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-12-14T12:39:09Z","pushed_at":"2016-12-14T18:16:10Z","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":439958,"stargazers_count":2150,"watchers_count":2150,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1423,"mirror_url":null,"open_issues_count":1161,"forks":1423,"open_issues":1161,"watchers":2150,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/12244"},"html":{"href":"https://github.com/openshift/origin/pull/12244"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/12244"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/12244/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/12244/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/12244/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/e1e9c945cd1cea6dc7ed4adcfe80d0c642c69139"}}}}
{"actor":{"display_login":"deads2k"}}