{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/50605719","id":50605719,"diff_hunk":"@@ -25,13 +30,45 @@ import (\n // ValidateEvent makes sure that the event makes sense.\n func ValidateEvent(event *api.Event) errs.ValidationErrorList {\n \tallErrs := errs.ValidationErrorList{}\n-\t// TODO: There is no namespace required for node.\n-\tif event.InvolvedObject.Kind != \"Node\" &&\n-\t\tevent.Namespace != event.InvolvedObject.Namespace {\n-\t\tallErrs = append(allErrs, errs.NewFieldInvalid(\"involvedObject.namespace\", event.InvolvedObject.Namespace, \"namespace does not match involvedObject\"))\n+\n+\t// Todo: Events may reference 3rd party object, and we can't check whether the object is namespaced. Suppose them are namespaced. Do check if we can get the piece of information.\n+\tgroupVersion := event.InvolvedObject.APIVersion\n+\tif groupVersion == \"v1\" || groupVersion == \"extensions/v1beta1\" {","path":"pkg/api/validation/events.go","position":24,"original_position":24,"commit_id":"81177f788314049baa23ee2ba08cc72c6e34eac5","original_commit_id":"81177f788314049baa23ee2ba08cc72c6e34eac5","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"body":"Perhaps add to the comment that this should apply to all groups served by this apiserver.","created_at":"2016-01-22T23:34:34Z","updated_at":"2016-01-22T23:34:34Z","html_url":"https://github.com/kubernetes/kubernetes/pull/16146#discussion_r50605719","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16146","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/50605719"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/16146#discussion_r50605719"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16146"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16146","id":48544843,"html_url":"https://github.com/kubernetes/kubernetes/pull/16146","diff_url":"https://github.com/kubernetes/kubernetes/pull/16146.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/16146.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16146","number":16146,"state":"open","locked":false,"title":"Fix validate event for non-namespaced kinds","user":{"login":"feihujiang","id":2322270,"avatar_url":"https://avatars.githubusercontent.com/u/2322270?v=3","gravatar_id":"","url":"https://api.github.com/users/feihujiang","html_url":"https://github.com/feihujiang","followers_url":"https://api.github.com/users/feihujiang/followers","following_url":"https://api.github.com/users/feihujiang/following{/other_user}","gists_url":"https://api.github.com/users/feihujiang/gists{/gist_id}","starred_url":"https://api.github.com/users/feihujiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feihujiang/subscriptions","organizations_url":"https://api.github.com/users/feihujiang/orgs","repos_url":"https://api.github.com/users/feihujiang/repos","events_url":"https://api.github.com/users/feihujiang/events{/privacy}","received_events_url":"https://api.github.com/users/feihujiang/received_events","type":"User","site_admin":false},"body":"Fix #16036","created_at":"2015-10-23T06:00:21Z","updated_at":"2016-01-22T23:34:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ff9c3f3a5d6ce02b1d750dbc8a0a2d37b3d3e65","assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16146/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16146/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16146/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/81177f788314049baa23ee2ba08cc72c6e34eac5","head":{"label":"feihujiang:FixValidateEventForNonNamespacedKinds","ref":"FixValidateEventForNonNamespacedKinds","sha":"81177f788314049baa23ee2ba08cc72c6e34eac5","user":{"login":"feihujiang","id":2322270,"avatar_url":"https://avatars.githubusercontent.com/u/2322270?v=3","gravatar_id":"","url":"https://api.github.com/users/feihujiang","html_url":"https://github.com/feihujiang","followers_url":"https://api.github.com/users/feihujiang/followers","following_url":"https://api.github.com/users/feihujiang/following{/other_user}","gists_url":"https://api.github.com/users/feihujiang/gists{/gist_id}","starred_url":"https://api.github.com/users/feihujiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feihujiang/subscriptions","organizations_url":"https://api.github.com/users/feihujiang/orgs","repos_url":"https://api.github.com/users/feihujiang/repos","events_url":"https://api.github.com/users/feihujiang/events{/privacy}","received_events_url":"https://api.github.com/users/feihujiang/received_events","type":"User","site_admin":false},"repo":{"id":32961171,"name":"kubernetes","full_name":"feihujiang/kubernetes","owner":{"login":"feihujiang","id":2322270,"avatar_url":"https://avatars.githubusercontent.com/u/2322270?v=3","gravatar_id":"","url":"https://api.github.com/users/feihujiang","html_url":"https://github.com/feihujiang","followers_url":"https://api.github.com/users/feihujiang/followers","following_url":"https://api.github.com/users/feihujiang/following{/other_user}","gists_url":"https://api.github.com/users/feihujiang/gists{/gist_id}","starred_url":"https://api.github.com/users/feihujiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feihujiang/subscriptions","organizations_url":"https://api.github.com/users/feihujiang/orgs","repos_url":"https://api.github.com/users/feihujiang/repos","events_url":"https://api.github.com/users/feihujiang/events{/privacy}","received_events_url":"https://api.github.com/users/feihujiang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/feihujiang/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/feihujiang/kubernetes","forks_url":"https://api.github.com/repos/feihujiang/kubernetes/forks","keys_url":"https://api.github.com/repos/feihujiang/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feihujiang/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feihujiang/kubernetes/teams","hooks_url":"https://api.github.com/repos/feihujiang/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/feihujiang/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/feihujiang/kubernetes/events","assignees_url":"https://api.github.com/repos/feihujiang/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/feihujiang/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/feihujiang/kubernetes/tags","blobs_url":"https://api.github.com/repos/feihujiang/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feihujiang/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feihujiang/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/feihujiang/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feihujiang/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/feihujiang/kubernetes/languages","stargazers_url":"https://api.github.com/repos/feihujiang/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/feihujiang/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/feihujiang/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/feihujiang/kubernetes/subscription","commits_url":"https://api.github.com/repos/feihujiang/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/feihujiang/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/feihujiang/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/feihujiang/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/feihujiang/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/feihujiang/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feihujiang/kubernetes/merges","archive_url":"https://api.github.com/repos/feihujiang/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feihujiang/kubernetes/downloads","issues_url":"https://api.github.com/repos/feihujiang/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/feihujiang/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/feihujiang/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/feihujiang/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feihujiang/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/feihujiang/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/feihujiang/kubernetes/deployments","created_at":"2015-03-27T01:23:13Z","updated_at":"2015-06-14T00:12:32Z","pushed_at":"2016-01-22T02:24:28Z","git_url":"git://github.com/feihujiang/kubernetes.git","ssh_url":"git@github.com:feihujiang/kubernetes.git","clone_url":"https://github.com/feihujiang/kubernetes.git","svn_url":"https://github.com/feihujiang/kubernetes","homepage":"http://kubernetes.io","size":148252,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"kubernetes:master","ref":"master","sha":"664d2ef4d26f555b05815089a6599d1b524c1807","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-01-22T21:25:22Z","pushed_at":"2016-01-22T23:34:02Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":308223,"stargazers_count":12293,"watchers_count":12293,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3462,"mirror_url":null,"open_issues_count":2832,"forks":3462,"open_issues":2832,"watchers":12293,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16146"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/16146"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/16146"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/16146/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16146/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16146/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/81177f788314049baa23ee2ba08cc72c6e34eac5"}}}}