{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/comments/202848057","pull_request_review_id":137624148,"id":202848057,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjg0ODA1Nw==","diff_hunk":"@@ -97,5 +97,46 @@ func (o *namespaceTransformer) Transform(m resmap.ResMap) error {\n \t\t}\n \n \t}\n+\to.updateClusterRoleBinding(m)\n \treturn nil\n }\n+\n+func (o *namespaceTransformer) updateClusterRoleBinding(m resmap.ResMap) {\n+\tsamap := resmap.ResMap{}\n+\tfor id := range m {\n+\t\tif id.Gvk().Kind == \"ServiceAccount\" {","path":"pkg/transformers/namespace.go","position":null,"original_position":11,"commit_id":"172fcc69ef733f81245d391ba42825e74f375568","original_commit_id":"73c005575d53de5772a48b59743ca4e741b0f557","user":{"login":"Liujingfang1","id":8498608,"node_id":"MDQ6VXNlcjg0OTg2MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/8498608?v=4","gravatar_id":"","url":"https://api.github.com/users/Liujingfang1","html_url":"https://github.com/Liujingfang1","followers_url":"https://api.github.com/users/Liujingfang1/followers","following_url":"https://api.github.com/users/Liujingfang1/following{/other_user}","gists_url":"https://api.github.com/users/Liujingfang1/gists{/gist_id}","starred_url":"https://api.github.com/users/Liujingfang1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liujingfang1/subscriptions","organizations_url":"https://api.github.com/users/Liujingfang1/orgs","repos_url":"https://api.github.com/users/Liujingfang1/repos","events_url":"https://api.github.com/users/Liujingfang1/events{/privacy}","received_events_url":"https://api.github.com/users/Liujingfang1/received_events","type":"User","site_admin":false},"body":"Added.","created_at":"2018-07-16T22:45:08Z","updated_at":"2018-07-16T22:45:08Z","html_url":"https://github.com/kubernetes-sigs/kustomize/pull/166#discussion_r202848057","pull_request_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/166","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/comments/202848057"},"html":{"href":"https://github.com/kubernetes-sigs/kustomize/pull/166#discussion_r202848057"},"pull_request":{"href":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/166"}},"in_reply_to_id":202827058},"pull_request":{"url":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/166","id":201370200,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMzcwMjAw","html_url":"https://github.com/kubernetes-sigs/kustomize/pull/166","diff_url":"https://github.com/kubernetes-sigs/kustomize/pull/166.diff","patch_url":"https://github.com/kubernetes-sigs/kustomize/pull/166.patch","issue_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/166","number":166,"state":"open","locked":false,"title":"Add namespace transformation for subjects.namespace in ClusterRoleBinding","user":{"login":"Liujingfang1","id":8498608,"node_id":"MDQ6VXNlcjg0OTg2MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/8498608?v=4","gravatar_id":"","url":"https://api.github.com/users/Liujingfang1","html_url":"https://github.com/Liujingfang1","followers_url":"https://api.github.com/users/Liujingfang1/followers","following_url":"https://api.github.com/users/Liujingfang1/following{/other_user}","gists_url":"https://api.github.com/users/Liujingfang1/gists{/gist_id}","starred_url":"https://api.github.com/users/Liujingfang1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liujingfang1/subscriptions","organizations_url":"https://api.github.com/users/Liujingfang1/orgs","repos_url":"https://api.github.com/users/Liujingfang1/repos","events_url":"https://api.github.com/users/Liujingfang1/events{/privacy}","received_events_url":"https://api.github.com/users/Liujingfang1/received_events","type":"User","site_admin":false},"body":"Fix #136\r\n\r\nAdd a function `updateClusterRoleBinding` as the final step of namespace transformer.\r\nThis function will \r\n- scan all subject items in the `subjects` list\r\n- get the `kind` and `name` of the subject item, check if this object has been declared in current kustomization\r\n- If found a matching object, update `namespace` in subject\r\n- If not found a matching object, which means the subject is external to this kustomization, don't do anything\r\n\r\n","created_at":"2018-07-13T18:43:15Z","updated_at":"2018-07-16T22:45:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97422697ea9a19ae1c8b3849fdfc94d31a48ff22","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":930398993,"node_id":"MDU6TGFiZWw5MzAzOTg5OTM=","url":"https://api.github.com/repos/kubernetes-sigs/kustomize/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":936746286,"node_id":"MDU6TGFiZWw5MzY3NDYyODY=","url":"https://api.github.com/repos/kubernetes-sigs/kustomize/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/166/commits","review_comments_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/166/comments","review_comment_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/166/comments","statuses_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/statuses/172fcc69ef733f81245d391ba42825e74f375568","head":{"label":"Liujingfang1:namespace","ref":"namespace","sha":"172fcc69ef733f81245d391ba42825e74f375568","user":{"login":"Liujingfang1","id":8498608,"node_id":"MDQ6VXNlcjg0OTg2MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/8498608?v=4","gravatar_id":"","url":"https://api.github.com/users/Liujingfang1","html_url":"https://github.com/Liujingfang1","followers_url":"https://api.github.com/users/Liujingfang1/followers","following_url":"https://api.github.com/users/Liujingfang1/following{/other_user}","gists_url":"https://api.github.com/users/Liujingfang1/gists{/gist_id}","starred_url":"https://api.github.com/users/Liujingfang1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liujingfang1/subscriptions","organizations_url":"https://api.github.com/users/Liujingfang1/orgs","repos_url":"https://api.github.com/users/Liujingfang1/repos","events_url":"https://api.github.com/users/Liujingfang1/events{/privacy}","received_events_url":"https://api.github.com/users/Liujingfang1/received_events","type":"User","site_admin":false},"repo":{"id":134768545,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ3Njg1NDU=","name":"kustomize","full_name":"Liujingfang1/kustomize","owner":{"login":"Liujingfang1","id":8498608,"node_id":"MDQ6VXNlcjg0OTg2MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/8498608?v=4","gravatar_id":"","url":"https://api.github.com/users/Liujingfang1","html_url":"https://github.com/Liujingfang1","followers_url":"https://api.github.com/users/Liujingfang1/followers","following_url":"https://api.github.com/users/Liujingfang1/following{/other_user}","gists_url":"https://api.github.com/users/Liujingfang1/gists{/gist_id}","starred_url":"https://api.github.com/users/Liujingfang1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liujingfang1/subscriptions","organizations_url":"https://api.github.com/users/Liujingfang1/orgs","repos_url":"https://api.github.com/users/Liujingfang1/repos","events_url":"https://api.github.com/users/Liujingfang1/events{/privacy}","received_events_url":"https://api.github.com/users/Liujingfang1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Liujingfang1/kustomize","description":"Customization of kubernetes YAML configurations","fork":true,"url":"https://api.github.com/repos/Liujingfang1/kustomize","forks_url":"https://api.github.com/repos/Liujingfang1/kustomize/forks","keys_url":"https://api.github.com/repos/Liujingfang1/kustomize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Liujingfang1/kustomize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Liujingfang1/kustomize/teams","hooks_url":"https://api.github.com/repos/Liujingfang1/kustomize/hooks","issue_events_url":"https://api.github.com/repos/Liujingfang1/kustomize/issues/events{/number}","events_url":"https://api.github.com/repos/Liujingfang1/kustomize/events","assignees_url":"https://api.github.com/repos/Liujingfang1/kustomize/assignees{/user}","branches_url":"https://api.github.com/repos/Liujingfang1/kustomize/branches{/branch}","tags_url":"https://api.github.com/repos/Liujingfang1/kustomize/tags","blobs_url":"https://api.github.com/repos/Liujingfang1/kustomize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Liujingfang1/kustomize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Liujingfang1/kustomize/git/refs{/sha}","trees_url":"https://api.github.com/repos/Liujingfang1/kustomize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Liujingfang1/kustomize/statuses/{sha}","languages_url":"https://api.github.com/repos/Liujingfang1/kustomize/languages","stargazers_url":"https://api.github.com/repos/Liujingfang1/kustomize/stargazers","contributors_url":"https://api.github.com/repos/Liujingfang1/kustomize/contributors","subscribers_url":"https://api.github.com/repos/Liujingfang1/kustomize/subscribers","subscription_url":"https://api.github.com/repos/Liujingfang1/kustomize/subscription","commits_url":"https://api.github.com/repos/Liujingfang1/kustomize/commits{/sha}","git_commits_url":"https://api.github.com/repos/Liujingfang1/kustomize/git/commits{/sha}","comments_url":"https://api.github.com/repos/Liujingfang1/kustomize/comments{/number}","issue_comment_url":"https://api.github.com/repos/Liujingfang1/kustomize/issues/comments{/number}","contents_url":"https://api.github.com/repos/Liujingfang1/kustomize/contents/{+path}","compare_url":"https://api.github.com/repos/Liujingfang1/kustomize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Liujingfang1/kustomize/merges","archive_url":"https://api.github.com/repos/Liujingfang1/kustomize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Liujingfang1/kustomize/downloads","issues_url":"https://api.github.com/repos/Liujingfang1/kustomize/issues{/number}","pulls_url":"https://api.github.com/repos/Liujingfang1/kustomize/pulls{/number}","milestones_url":"https://api.github.com/repos/Liujingfang1/kustomize/milestones{/number}","notifications_url":"https://api.github.com/repos/Liujingfang1/kustomize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Liujingfang1/kustomize/labels{/name}","releases_url":"https://api.github.com/repos/Liujingfang1/kustomize/releases{/id}","deployments_url":"https://api.github.com/repos/Liujingfang1/kustomize/deployments","created_at":"2018-05-24T21:02:30Z","updated_at":"2018-07-11T21:28:08Z","pushed_at":"2018-07-16T22:44:47Z","git_url":"git://github.com/Liujingfang1/kustomize.git","ssh_url":"git@github.com:Liujingfang1/kustomize.git","clone_url":"https://github.com/Liujingfang1/kustomize.git","svn_url":"https://github.com/Liujingfang1/kustomize","homepage":"","size":12456,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes-sigs:master","ref":"master","sha":"65af5c13f16881059a5fb038b9f890244aeb5cab","user":{"login":"kubernetes-sigs","id":36015203,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MDE1MjAz","avatar_url":"https://avatars1.githubusercontent.com/u/36015203?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-sigs","html_url":"https://github.com/kubernetes-sigs","followers_url":"https://api.github.com/users/kubernetes-sigs/followers","following_url":"https://api.github.com/users/kubernetes-sigs/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-sigs/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-sigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-sigs/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-sigs/orgs","repos_url":"https://api.github.com/users/kubernetes-sigs/repos","events_url":"https://api.github.com/users/kubernetes-sigs/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-sigs/received_events","type":"Organization","site_admin":false},"repo":{"id":133067498,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMwNjc0OTg=","name":"kustomize","full_name":"kubernetes-sigs/kustomize","owner":{"login":"kubernetes-sigs","id":36015203,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MDE1MjAz","avatar_url":"https://avatars1.githubusercontent.com/u/36015203?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-sigs","html_url":"https://github.com/kubernetes-sigs","followers_url":"https://api.github.com/users/kubernetes-sigs/followers","following_url":"https://api.github.com/users/kubernetes-sigs/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-sigs/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-sigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-sigs/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-sigs/orgs","repos_url":"https://api.github.com/users/kubernetes-sigs/repos","events_url":"https://api.github.com/users/kubernetes-sigs/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-sigs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes-sigs/kustomize","description":"Customization of kubernetes YAML configurations","fork":false,"url":"https://api.github.com/repos/kubernetes-sigs/kustomize","forks_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/forks","keys_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/teams","hooks_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/hooks","issue_events_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/events","assignees_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/tags","blobs_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/languages","stargazers_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/stargazers","contributors_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/contributors","subscribers_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/subscribers","subscription_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/subscription","commits_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/merges","archive_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/downloads","issues_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes-sigs/kustomize/deployments","created_at":"2018-05-11T17:09:33Z","updated_at":"2018-07-16T20:07:16Z","pushed_at":"2018-07-16T22:44:49Z","git_url":"git://github.com/kubernetes-sigs/kustomize.git","ssh_url":"git@github.com:kubernetes-sigs/kustomize.git","clone_url":"https://github.com/kubernetes-sigs/kustomize.git","svn_url":"https://github.com/kubernetes-sigs/kustomize","homepage":"","size":12447,"stargazers_count":599,"watchers_count":599,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"archived":false,"open_issues_count":49,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":46,"open_issues":49,"watchers":599,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/166"},"html":{"href":"https://github.com/kubernetes-sigs/kustomize/pull/166"},"issue":{"href":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/166"},"comments":{"href":"https://api.github.com/repos/kubernetes-sigs/kustomize/issues/166/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/166/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes-sigs/kustomize/pulls/166/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes-sigs/kustomize/statuses/172fcc69ef733f81245d391ba42825e74f375568"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Liujingfang1"}}