{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/comments/225623145","pull_request_review_id":165258942,"id":225623145,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTYyMzE0NQ==","diff_hunk":"@@ -176,8 +176,22 @@ func newFederationSyncController(typeConfig typeconfig.Interface, kubeConfig *re\n \ttargetAPIResource := typeConfig.GetTarget()\n \tif targetAPIResource.Kind == util.NamespaceKind {\n \t\ts.placementPlugin = placement.NewNamespacePlacementPlugin(placementClient, targetNamespace, enqueueObj)\n-\t} else {\n+\t} else if targetNamespace == metav1.NamespaceAll {\n \t\ts.placementPlugin = placement.NewResourcePlacementPlugin(placementClient, targetNamespace, enqueueObj)\n+\t} else {","path":"pkg/controller/sync/controller.go","position":7,"original_position":7,"commit_id":"3b504a52e58a84d484c50bc3a07aabdd68bfabd8","original_commit_id":"bfd592874f01f21ab8629531add55cf173ec3408","user":{"login":"font","id":3596535,"node_id":"MDQ6VXNlcjM1OTY1MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/3596535?v=4","gravatar_id":"","url":"https://api.github.com/users/font","html_url":"https://github.com/font","followers_url":"https://api.github.com/users/font/followers","following_url":"https://api.github.com/users/font/following{/other_user}","gists_url":"https://api.github.com/users/font/gists{/gist_id}","starred_url":"https://api.github.com/users/font/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/font/subscriptions","organizations_url":"https://api.github.com/users/font/orgs","repos_url":"https://api.github.com/users/font/repos","events_url":"https://api.github.com/users/font/events{/privacy}","received_events_url":"https://api.github.com/users/font/received_events","type":"User","site_admin":false},"body":"Yes, better error handling would do the trick too. In regards to getting the `namespace does not exist` error, I'm wondering if error handling would require looking at namespace placement to determine if the namespace should really exist, or if it was somehow removed for another reason in which case the error should really be logged.","created_at":"2018-10-16T16:52:09Z","updated_at":"2018-10-16T16:56:21Z","html_url":"https://github.com/kubernetes-sigs/federation-v2/pull/309#discussion_r225623145","pull_request_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/309","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/comments/225623145"},"html":{"href":"https://github.com/kubernetes-sigs/federation-v2/pull/309#discussion_r225623145"},"pull_request":{"href":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/309"}},"in_reply_to_id":225389491},"pull_request":{"url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/309","id":220216856,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMjE2ODU2","html_url":"https://github.com/kubernetes-sigs/federation-v2/pull/309","diff_url":"https://github.com/kubernetes-sigs/federation-v2/pull/309.diff","patch_url":"https://github.com/kubernetes-sigs/federation-v2/pull/309.patch","issue_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/issues/309","number":309,"state":"open","locked":false,"title":"Support defaulting to namespace placement for namespace-scoped federation","user":{"login":"marun","id":451477,"node_id":"MDQ6VXNlcjQ1MTQ3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/451477?v=4","gravatar_id":"","url":"https://api.github.com/users/marun","html_url":"https://github.com/marun","followers_url":"https://api.github.com/users/marun/followers","following_url":"https://api.github.com/users/marun/following{/other_user}","gists_url":"https://api.github.com/users/marun/gists{/gist_id}","starred_url":"https://api.github.com/users/marun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marun/subscriptions","organizations_url":"https://api.github.com/users/marun/orgs","repos_url":"https://api.github.com/users/marun/repos","events_url":"https://api.github.com/users/marun/events{/privacy}","received_events_url":"https://api.github.com/users/marun/received_events","type":"User","site_admin":false},"body":"In cluster-scoped federation, the namespace sync controller uses namespace placement to determine whether a namespace should appear in member clusters. If a namespace does not appear in member clusters, any resources it contains are also prevented from appearing.\r\n\r\nSince namespace-scoped federation does not run the namespace sync controller, namespace placement would have no effect.  This PR changes that by ensuring that, for namespaced federation, placement for a given resource is the determined from the resource and namespace placement.\r\n\r\nFixes #298","created_at":"2018-10-04T00:19:40Z","updated_at":"2018-10-16T16:56:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb6c257cdce4e8411ef612ce368d07b37bf59207","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pmorie","id":366488,"node_id":"MDQ6VXNlcjM2NjQ4OA==","avatar_url":"https://avatars2.githubusercontent.com/u/366488?v=4","gravatar_id":"","url":"https://api.github.com/users/pmorie","html_url":"https://github.com/pmorie","followers_url":"https://api.github.com/users/pmorie/followers","following_url":"https://api.github.com/users/pmorie/following{/other_user}","gists_url":"https://api.github.com/users/pmorie/gists{/gist_id}","starred_url":"https://api.github.com/users/pmorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmorie/subscriptions","organizations_url":"https://api.github.com/users/pmorie/orgs","repos_url":"https://api.github.com/users/pmorie/repos","events_url":"https://api.github.com/users/pmorie/events{/privacy}","received_events_url":"https://api.github.com/users/pmorie/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":909764227,"node_id":"MDU6TGFiZWw5MDk3NjQyMjc=","url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":888036019,"node_id":"MDU6TGFiZWw4ODgwMzYwMTk=","url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":907889168,"node_id":"MDU6TGFiZWw5MDc4ODkxNjg=","url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/309/commits","review_comments_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/309/comments","review_comment_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/issues/309/comments","statuses_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/statuses/3b504a52e58a84d484c50bc3a07aabdd68bfabd8","head":{"label":"marun:namespaced-placement","ref":"namespaced-placement","sha":"3b504a52e58a84d484c50bc3a07aabdd68bfabd8","user":{"login":"marun","id":451477,"node_id":"MDQ6VXNlcjQ1MTQ3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/451477?v=4","gravatar_id":"","url":"https://api.github.com/users/marun","html_url":"https://github.com/marun","followers_url":"https://api.github.com/users/marun/followers","following_url":"https://api.github.com/users/marun/following{/other_user}","gists_url":"https://api.github.com/users/marun/gists{/gist_id}","starred_url":"https://api.github.com/users/marun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marun/subscriptions","organizations_url":"https://api.github.com/users/marun/orgs","repos_url":"https://api.github.com/users/marun/repos","events_url":"https://api.github.com/users/marun/events{/privacy}","received_events_url":"https://api.github.com/users/marun/received_events","type":"User","site_admin":false},"repo":{"id":130527783,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA1Mjc3ODM=","name":"federation-v2","full_name":"marun/federation-v2","private":false,"owner":{"login":"marun","id":451477,"node_id":"MDQ6VXNlcjQ1MTQ3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/451477?v=4","gravatar_id":"","url":"https://api.github.com/users/marun","html_url":"https://github.com/marun","followers_url":"https://api.github.com/users/marun/followers","following_url":"https://api.github.com/users/marun/following{/other_user}","gists_url":"https://api.github.com/users/marun/gists{/gist_id}","starred_url":"https://api.github.com/users/marun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marun/subscriptions","organizations_url":"https://api.github.com/users/marun/orgs","repos_url":"https://api.github.com/users/marun/repos","events_url":"https://api.github.com/users/marun/events{/privacy}","received_events_url":"https://api.github.com/users/marun/received_events","type":"User","site_admin":false},"html_url":"https://github.com/marun/federation-v2","description":"Kubernetes Federation v2 Prototype","fork":true,"url":"https://api.github.com/repos/marun/federation-v2","forks_url":"https://api.github.com/repos/marun/federation-v2/forks","keys_url":"https://api.github.com/repos/marun/federation-v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marun/federation-v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marun/federation-v2/teams","hooks_url":"https://api.github.com/repos/marun/federation-v2/hooks","issue_events_url":"https://api.github.com/repos/marun/federation-v2/issues/events{/number}","events_url":"https://api.github.com/repos/marun/federation-v2/events","assignees_url":"https://api.github.com/repos/marun/federation-v2/assignees{/user}","branches_url":"https://api.github.com/repos/marun/federation-v2/branches{/branch}","tags_url":"https://api.github.com/repos/marun/federation-v2/tags","blobs_url":"https://api.github.com/repos/marun/federation-v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marun/federation-v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marun/federation-v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/marun/federation-v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marun/federation-v2/statuses/{sha}","languages_url":"https://api.github.com/repos/marun/federation-v2/languages","stargazers_url":"https://api.github.com/repos/marun/federation-v2/stargazers","contributors_url":"https://api.github.com/repos/marun/federation-v2/contributors","subscribers_url":"https://api.github.com/repos/marun/federation-v2/subscribers","subscription_url":"https://api.github.com/repos/marun/federation-v2/subscription","commits_url":"https://api.github.com/repos/marun/federation-v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/marun/federation-v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/marun/federation-v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/marun/federation-v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/marun/federation-v2/contents/{+path}","compare_url":"https://api.github.com/repos/marun/federation-v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marun/federation-v2/merges","archive_url":"https://api.github.com/repos/marun/federation-v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marun/federation-v2/downloads","issues_url":"https://api.github.com/repos/marun/federation-v2/issues{/number}","pulls_url":"https://api.github.com/repos/marun/federation-v2/pulls{/number}","milestones_url":"https://api.github.com/repos/marun/federation-v2/milestones{/number}","notifications_url":"https://api.github.com/repos/marun/federation-v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marun/federation-v2/labels{/name}","releases_url":"https://api.github.com/repos/marun/federation-v2/releases{/id}","deployments_url":"https://api.github.com/repos/marun/federation-v2/deployments","created_at":"2018-04-22T02:15:08Z","updated_at":"2018-08-24T16:41:38Z","pushed_at":"2018-10-16T15:52:16Z","git_url":"git://github.com/marun/federation-v2.git","ssh_url":"git@github.com:marun/federation-v2.git","clone_url":"https://github.com/marun/federation-v2.git","svn_url":"https://github.com/marun/federation-v2","homepage":"","size":63357,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"kubernetes-sigs:master","ref":"master","sha":"597daa95b85a225e88d1ab5fcb04da3c3075fbe7","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":116825580,"node_id":"MDEwOlJlcG9zaXRvcnkxMTY4MjU1ODA=","name":"federation-v2","full_name":"kubernetes-sigs/federation-v2","private":false,"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},"html_url":"https://github.com/kubernetes-sigs/federation-v2","description":"Kubernetes Federation v2 Prototype","fork":false,"url":"https://api.github.com/repos/kubernetes-sigs/federation-v2","forks_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/forks","keys_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/teams","hooks_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/hooks","issue_events_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/events","assignees_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/tags","blobs_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/languages","stargazers_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/stargazers","contributors_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/contributors","subscribers_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/subscribers","subscription_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/subscription","commits_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/merges","archive_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/downloads","issues_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes-sigs/federation-v2/deployments","created_at":"2018-01-09T14:21:03Z","updated_at":"2018-10-16T16:31:09Z","pushed_at":"2018-10-16T16:43:30Z","git_url":"git://github.com/kubernetes-sigs/federation-v2.git","ssh_url":"git@github.com:kubernetes-sigs/federation-v2.git","clone_url":"https://github.com/kubernetes-sigs/federation-v2.git","svn_url":"https://github.com/kubernetes-sigs/federation-v2","homepage":"","size":63363,"stargazers_count":81,"watchers_count":81,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":71,"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":38,"open_issues":71,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/309"},"html":{"href":"https://github.com/kubernetes-sigs/federation-v2/pull/309"},"issue":{"href":"https://api.github.com/repos/kubernetes-sigs/federation-v2/issues/309"},"comments":{"href":"https://api.github.com/repos/kubernetes-sigs/federation-v2/issues/309/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/309/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes-sigs/federation-v2/pulls/309/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes-sigs/federation-v2/statuses/3b504a52e58a84d484c50bc3a07aabdd68bfabd8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"font"}}