{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/38364727","id":38364727,"diff_hunk":"@@ -484,6 +489,31 @@ func validateGlusterfs(glusterfs *api.GlusterfsVolumeSource) errs.ValidationErro\n \treturn allErrs\n }\n \n+var validDownwardAPIFieldPathExpressions = util.NewStringSet(\"metadata.name\", \"metadata.namespace\", \"metadata.labels\", \"metadata.annotations\")\n+\n+func validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSource) errs.ValidationErrorList {\n+\tallErrs := errs.ValidationErrorList{}\n+\tfor _, downwardAPIVolumeFile := range downwardAPIVolume.Items {\n+\t\tif len(downwardAPIVolumeFile.Path) == 0 {\n+\t\t\tallErrs = append(allErrs, errs.NewFieldRequired(\"path\"))\n+\t\t}\n+\t\tif path.IsAbs(downwardAPIVolumeFile.Path) {\n+\t\t\tallErrs = append(allErrs, errs.NewFieldForbidden(\"path\", \"must not be an absolute path\"))\n+\t\t}\n+\t\titems := strings.Split(downwardAPIVolumeFile.Path, string(os.PathSeparator))\n+\t\tfor _, item := range items {\n+\t\t\tif item == \"..\" {\n+\t\t\t\tallErrs = append(allErrs, errs.NewFieldInvalid(\"path\", downwardAPIVolumeFile.Path, \"must not contain \\\"..\\\".\"))\n+\t\t\t}\n+\t\t}\n+\t\tif strings.HasPrefix(items[0], \"..\") && len(items[0]) > 2 {\n+\t\t\tallErrs = append(allErrs, errs.NewFieldForbidden(\"path\", \"must not start with \\\"..\\\".\"))","path":"pkg/api/validation/validation.go","position":41,"original_position":41,"commit_id":"b6255d6503c8e3c7e5f8f3a858bf41014908eb62","original_commit_id":"b6255d6503c8e3c7e5f8f3a858bf41014908eb62","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"body":"this should be Invalid","created_at":"2015-08-31T21:58:35Z","updated_at":"2015-08-31T21:58:35Z","html_url":"https://github.com/kubernetes/kubernetes/pull/5093#discussion_r38364727","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/5093","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/38364727"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/5093#discussion_r38364727"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/5093"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/5093","id":30563615,"html_url":"https://github.com/kubernetes/kubernetes/pull/5093","diff_url":"https://github.com/kubernetes/kubernetes/pull/5093.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/5093.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/5093","number":5093,"state":"open","locked":false,"title":"downward api volume plugin","user":{"login":"sdminonne","id":9527409,"avatar_url":"https://avatars.githubusercontent.com/u/9527409?v=3","gravatar_id":"","url":"https://api.github.com/users/sdminonne","html_url":"https://github.com/sdminonne","followers_url":"https://api.github.com/users/sdminonne/followers","following_url":"https://api.github.com/users/sdminonne/following{/other_user}","gists_url":"https://api.github.com/users/sdminonne/gists{/gist_id}","starred_url":"https://api.github.com/users/sdminonne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdminonne/subscriptions","organizations_url":"https://api.github.com/users/sdminonne/orgs","repos_url":"https://api.github.com/users/sdminonne/repos","events_url":"https://api.github.com/users/sdminonne/events{/privacy}","received_events_url":"https://api.github.com/users/sdminonne/received_events","type":"User","site_admin":false},"body":"This PR implements https://github.com/GoogleCloudPlatform/kubernetes/issues/560 especially what is discussed [here](https://github.com/GoogleCloudPlatform/kubernetes/issues/560#issuecomment-74514926)\r\nDumping info in files is were discussed in https://github.com/GoogleCloudPlatform/kubernetes/issues/386 as well.\r\n\r\nNeeds rebasing after https://github.com/GoogleCloudPlatform/kubernetes/pull/8788 is merged \r\n","created_at":"2015-03-05T15:02:57Z","updated_at":"2015-08-31T21:58:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"525b10ca65763ff939be3ee4dfe06ffd7c279bff","assignee":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/5093/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/5093/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/5093/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/b6255d6503c8e3c7e5f8f3a858bf41014908eb62","head":{"label":"sdminonne:container_sidecar","ref":"container_sidecar","sha":"b6255d6503c8e3c7e5f8f3a858bf41014908eb62","user":{"login":"sdminonne","id":9527409,"avatar_url":"https://avatars.githubusercontent.com/u/9527409?v=3","gravatar_id":"","url":"https://api.github.com/users/sdminonne","html_url":"https://github.com/sdminonne","followers_url":"https://api.github.com/users/sdminonne/followers","following_url":"https://api.github.com/users/sdminonne/following{/other_user}","gists_url":"https://api.github.com/users/sdminonne/gists{/gist_id}","starred_url":"https://api.github.com/users/sdminonne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdminonne/subscriptions","organizations_url":"https://api.github.com/users/sdminonne/orgs","repos_url":"https://api.github.com/users/sdminonne/repos","events_url":"https://api.github.com/users/sdminonne/events{/privacy}","received_events_url":"https://api.github.com/users/sdminonne/received_events","type":"User","site_admin":false},"repo":{"id":27047169,"name":"kubernetes","full_name":"sdminonne/kubernetes","owner":{"login":"sdminonne","id":9527409,"avatar_url":"https://avatars.githubusercontent.com/u/9527409?v=3","gravatar_id":"","url":"https://api.github.com/users/sdminonne","html_url":"https://github.com/sdminonne","followers_url":"https://api.github.com/users/sdminonne/followers","following_url":"https://api.github.com/users/sdminonne/following{/other_user}","gists_url":"https://api.github.com/users/sdminonne/gists{/gist_id}","starred_url":"https://api.github.com/users/sdminonne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdminonne/subscriptions","organizations_url":"https://api.github.com/users/sdminonne/orgs","repos_url":"https://api.github.com/users/sdminonne/repos","events_url":"https://api.github.com/users/sdminonne/events{/privacy}","received_events_url":"https://api.github.com/users/sdminonne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sdminonne/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/sdminonne/kubernetes","forks_url":"https://api.github.com/repos/sdminonne/kubernetes/forks","keys_url":"https://api.github.com/repos/sdminonne/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sdminonne/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sdminonne/kubernetes/teams","hooks_url":"https://api.github.com/repos/sdminonne/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/sdminonne/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/sdminonne/kubernetes/events","assignees_url":"https://api.github.com/repos/sdminonne/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/sdminonne/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/sdminonne/kubernetes/tags","blobs_url":"https://api.github.com/repos/sdminonne/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sdminonne/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sdminonne/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/sdminonne/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sdminonne/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/sdminonne/kubernetes/languages","stargazers_url":"https://api.github.com/repos/sdminonne/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/sdminonne/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/sdminonne/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/sdminonne/kubernetes/subscription","commits_url":"https://api.github.com/repos/sdminonne/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/sdminonne/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/sdminonne/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/sdminonne/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/sdminonne/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/sdminonne/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sdminonne/kubernetes/merges","archive_url":"https://api.github.com/repos/sdminonne/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sdminonne/kubernetes/downloads","issues_url":"https://api.github.com/repos/sdminonne/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/sdminonne/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/sdminonne/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/sdminonne/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sdminonne/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/sdminonne/kubernetes/releases{/id}","created_at":"2014-11-23T20:52:45Z","updated_at":"2015-05-06T22:08:25Z","pushed_at":"2015-08-31T21:49:49Z","git_url":"git://github.com/sdminonne/kubernetes.git","ssh_url":"git@github.com:sdminonne/kubernetes.git","clone_url":"https://github.com/sdminonne/kubernetes.git","svn_url":"https://github.com/sdminonne/kubernetes","homepage":null,"size":103043,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"044e4854e1bca78b6e587cb154fd8058ba784ce0","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}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-08-31T20:59:49Z","pushed_at":"2015-08-31T21:57:21Z","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":367988,"stargazers_count":9979,"watchers_count":9979,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2434,"mirror_url":null,"open_issues_count":1683,"forks":2434,"open_issues":1683,"watchers":9979,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/5093"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/5093"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/5093"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/5093/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/5093/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/5093/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/b6255d6503c8e3c7e5f8f3a858bf41014908eb62"}}}}