{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/70284593","id":70284593,"diff_hunk":"@@ -1022,11 +1022,22 @@ func ValidatePersistentVolumeClaim(pvc *api.PersistentVolumeClaim) field.ErrorLi\n func ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc *api.PersistentVolumeClaim) field.ErrorList {\n \tallErrs := ValidateObjectMetaUpdate(&newPvc.ObjectMeta, &oldPvc.ObjectMeta, field.NewPath(\"metadata\"))\n \tallErrs = append(allErrs, ValidatePersistentVolumeClaim(newPvc)...)\n-\t// if a pvc had a bound volume, we should not allow updates to resources or access modes\n-\tif len(oldPvc.Spec.VolumeName) != 0 {\n-\t\tif !api.Semantic.DeepEqual(newPvc.Spec, oldPvc.Spec) {\n-\t\t\tallErrs = append(allErrs, field.Forbidden(field.NewPath(\"spec\"), \"spec is immutable once a claim has been bound to a volume\"))\n-\t\t}\n+\t// PVController needs to update PVC.Spec w/ VolumeName.\n+\t// Claims are immutable in order to enforce quota, range limits, etc. without gaming the system.\n+\trequiresResetToEmptyString := false\n+\tif len(oldPvc.Spec.VolumeName) == 0 {\n+\t\t// volumeName changes are allowed once.\n+\t\t// Reset back to empty string after equality check\n+\t\toldPvc.Spec.VolumeName = newPvc.Spec.VolumeName\n+\t\trequiresResetToEmptyString = true","path":"pkg/api/validation/validation.go","position":null,"original_position":16,"commit_id":"3ddb8470b992ec3ff4b4c36818d7d6b5cff0aa6c","original_commit_id":"26166cb39507b56559c6a28cd566ad6f5a9a68e9","user":{"login":"markturansky","id":8001968,"avatar_url":"https://avatars.githubusercontent.com/u/8001968?v=3","gravatar_id":"","url":"https://api.github.com/users/markturansky","html_url":"https://github.com/markturansky","followers_url":"https://api.github.com/users/markturansky/followers","following_url":"https://api.github.com/users/markturansky/following{/other_user}","gists_url":"https://api.github.com/users/markturansky/gists{/gist_id}","starred_url":"https://api.github.com/users/markturansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markturansky/subscriptions","organizations_url":"https://api.github.com/users/markturansky/orgs","repos_url":"https://api.github.com/users/markturansky/repos","events_url":"https://api.github.com/users/markturansky/events{/privacy}","received_events_url":"https://api.github.com/users/markturansky/received_events","type":"User","site_admin":false},"body":"Good idea. Makes for shorter code. Done.","created_at":"2016-07-11T15:51:44Z","updated_at":"2016-07-11T15:51:44Z","html_url":"https://github.com/kubernetes/kubernetes/pull/28690#discussion_r70284593","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28690","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/70284593"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/28690#discussion_r70284593"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28690"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28690","id":76777344,"html_url":"https://github.com/kubernetes/kubernetes/pull/28690","diff_url":"https://github.com/kubernetes/kubernetes/pull/28690.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/28690.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/28690","number":28690,"state":"open","locked":false,"title":"PersistentVolumeClaim.Spec is immutable once created","user":{"login":"markturansky","id":8001968,"avatar_url":"https://avatars.githubusercontent.com/u/8001968?v=3","gravatar_id":"","url":"https://api.github.com/users/markturansky","html_url":"https://github.com/markturansky","followers_url":"https://api.github.com/users/markturansky/followers","following_url":"https://api.github.com/users/markturansky/following{/other_user}","gists_url":"https://api.github.com/users/markturansky/gists{/gist_id}","starred_url":"https://api.github.com/users/markturansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markturansky/subscriptions","organizations_url":"https://api.github.com/users/markturansky/orgs","repos_url":"https://api.github.com/users/markturansky/repos","events_url":"https://api.github.com/users/markturansky/events{/privacy}","received_events_url":"https://api.github.com/users/markturansky/received_events","type":"User","site_admin":false},"body":"Per https://github.com/kubernetes/kubernetes/pull/28636, PVCs are immutable post-creation in order to enforce quota, limitRange, etc. without being able to game the system.\r\n\r\n@derekwaynecarr @abhgupta @smarterclayton @kubernetes/sig-storage \r\n\r\n[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()\r\n\r\n","created_at":"2016-07-08T16:15:31Z","updated_at":"2016-07-11T15:51:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3fe325f7a371b65a096eb0ba4cf2ca32473ca5e0","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},"assignees":[{"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/28690/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28690/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/28690/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/3ddb8470b992ec3ff4b4c36818d7d6b5cff0aa6c","head":{"label":"markturansky:immutable_claim","ref":"immutable_claim","sha":"3ddb8470b992ec3ff4b4c36818d7d6b5cff0aa6c","user":{"login":"markturansky","id":8001968,"avatar_url":"https://avatars.githubusercontent.com/u/8001968?v=3","gravatar_id":"","url":"https://api.github.com/users/markturansky","html_url":"https://github.com/markturansky","followers_url":"https://api.github.com/users/markturansky/followers","following_url":"https://api.github.com/users/markturansky/following{/other_user}","gists_url":"https://api.github.com/users/markturansky/gists{/gist_id}","starred_url":"https://api.github.com/users/markturansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markturansky/subscriptions","organizations_url":"https://api.github.com/users/markturansky/orgs","repos_url":"https://api.github.com/users/markturansky/repos","events_url":"https://api.github.com/users/markturansky/events{/privacy}","received_events_url":"https://api.github.com/users/markturansky/received_events","type":"User","site_admin":false},"repo":{"id":24423869,"name":"kubernetes","full_name":"markturansky/kubernetes","owner":{"login":"markturansky","id":8001968,"avatar_url":"https://avatars.githubusercontent.com/u/8001968?v=3","gravatar_id":"","url":"https://api.github.com/users/markturansky","html_url":"https://github.com/markturansky","followers_url":"https://api.github.com/users/markturansky/followers","following_url":"https://api.github.com/users/markturansky/following{/other_user}","gists_url":"https://api.github.com/users/markturansky/gists{/gist_id}","starred_url":"https://api.github.com/users/markturansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markturansky/subscriptions","organizations_url":"https://api.github.com/users/markturansky/orgs","repos_url":"https://api.github.com/users/markturansky/repos","events_url":"https://api.github.com/users/markturansky/events{/privacy}","received_events_url":"https://api.github.com/users/markturansky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/markturansky/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/markturansky/kubernetes","forks_url":"https://api.github.com/repos/markturansky/kubernetes/forks","keys_url":"https://api.github.com/repos/markturansky/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/markturansky/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/markturansky/kubernetes/teams","hooks_url":"https://api.github.com/repos/markturansky/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/markturansky/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/markturansky/kubernetes/events","assignees_url":"https://api.github.com/repos/markturansky/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/markturansky/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/markturansky/kubernetes/tags","blobs_url":"https://api.github.com/repos/markturansky/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/markturansky/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/markturansky/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/markturansky/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/markturansky/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/markturansky/kubernetes/languages","stargazers_url":"https://api.github.com/repos/markturansky/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/markturansky/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/markturansky/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/markturansky/kubernetes/subscription","commits_url":"https://api.github.com/repos/markturansky/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/markturansky/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/markturansky/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/markturansky/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/markturansky/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/markturansky/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/markturansky/kubernetes/merges","archive_url":"https://api.github.com/repos/markturansky/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/markturansky/kubernetes/downloads","issues_url":"https://api.github.com/repos/markturansky/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/markturansky/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/markturansky/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/markturansky/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/markturansky/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/markturansky/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/markturansky/kubernetes/deployments","created_at":"2014-09-24T16:55:04Z","updated_at":"2016-01-11T17:02:35Z","pushed_at":"2016-07-11T15:51:26Z","git_url":"git://github.com/markturansky/kubernetes.git","ssh_url":"git@github.com:markturansky/kubernetes.git","clone_url":"https://github.com/markturansky/kubernetes.git","svn_url":"https://github.com/markturansky/kubernetes","homepage":null,"size":275050,"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":"9b74e24fa3349fbb1d747de66f1d2e625c938d69","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":"Production-Grade Container Scheduling and Management","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-07-11T14:58:13Z","pushed_at":"2016-07-11T15:51:27Z","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":490088,"stargazers_count":15448,"watchers_count":15448,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4841,"mirror_url":null,"open_issues_count":3916,"forks":4841,"open_issues":3916,"watchers":15448,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28690"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/28690"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/28690"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/28690/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28690/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28690/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/3ddb8470b992ec3ff4b4c36818d7d6b5cff0aa6c"}}}}
{"actor":{"display_login":"markturansky"}}