{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/42007207","id":42007207,"diff_hunk":"@@ -0,0 +1,141 @@\n+<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->\n+\n+<!-- BEGIN STRIP_FOR_RELEASE -->\n+\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+\n+<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>\n+\n+If you are using a released version of Kubernetes, you should\n+refer to the docs that go with that version.\n+\n+<strong>\n+The latest 1.0.x release of this document can be found\n+[here](http://releases.k8s.io/release-1.0/examples/experimental/persistent-volume-provisioning/README.md).\n+\n+Documentation for other releases can be found at\n+[releases.k8s.io](http://releases.k8s.io).\n+</strong>\n+--\n+\n+<!-- END STRIP_FOR_RELEASE -->\n+\n+<!-- END MUNGE: UNVERSIONED_WARNING -->\n+\n+## Persistent Volume Provisioning\n+\n+This example shows how to use experimental persistent volume provisioning.\n+\n+### Pre-requisites\n+\n+This example assumes that you have an understanding of Kubernetes administration and can modify the scripts that launch kube-controller-manager.\n+\n+### Admin Configuration\n+\n+Admins configure their clusters with Provisioners tied to quality-of-service classes.  The correct configuration will be\n+the class name and the volume plugin responsible for provisioning that request separated by a slash.  The configuration is\n+added as a CLI flag to kube-controller-manager.\n+\n+For example, an admin running in AWS can add class \"foo\" that provisioned using EBS:\n+\n+```\n+# where 'foo' is the class and 'kubernetes.io/aws-ebs' is the EBS plugin\n+--storage-class=\"foo/kubernetes.io/aws-ebs\"\n+```\n+\n+The CLI flag \"--storage-class\" can be used many times to add many provisioners. As the number and types of provisioners increase, admins\n+can add many QoS classes with various backends to satisfy their needs.\n+\n+```\n+--storage-class=\"foo/kubernetes.io/aws-ebs\" \n+--storage-class=\"gold/kubernetes.io/aws-ebs-ssd\"       # future implementation\n+--storage-class=\"silver/kubernetes.io/aws-ebs-hd\"      # future implementation\n+--storage-class=\"bronze/kubernetes.io/aws-ebs-glacial\" # future implementation\n+```\n+\n+#### Provisioners\n+\n+Four Kubernetes persistent volume plugins have generic implementations for dynamic provisioning.\n+\n+The plugin names are:\n+\n+1. GCE PD  - \"kubernetes.io/gce-pd\"\n+2. AWS EBS - \"kubernetes.io/aws-ebs\"\n+3. OpenStack Cinder - \"kubernetes.io/cinder\"\n+4. HostPath - \"kubernetes.io/host-path\"\n+\n+> Important! HostPath as a provisioner is meant for local development and testing only.  It _will not work_ in a multi-node cluster\n+and is not supported in Kubernetes in any way outside local testing.\n+\n+Note that the first three are mutually independent and only 1 would be available at a time in a cloud environment.\n+\n+### User storage requests\n+\n+Users request dynamically provisioned storage by including a quality-of-service class in their `PersistentVolumeClaim`.\n+An annotation is used to access this experimental feature.  In the future, the QoS class request will likely be a field on the claim itself.\n+\n+Assuming an admin configures a \"foo\" provisioner, a user would create a PVC with a special annotation requesting a quality-of-service class:\n+\n+```\n+{\n+  \"kind\": \"PersistentVolumeClaim\",\n+  \"apiVersion\": \"v1\",\n+  \"metadata\": {\n+    \"name\": \"claim1\",\n+    \"annotations\": {\n+      \"volume.experimental.kubernetes.io/quality-of-service\": \"foo\"\n+    }\n+  },\n+  \"spec\": {\n+    \"accessModes\": [\n+      \"ReadWriteOnce\"\n+    ],\n+    \"resources\": {\n+      \"requests\": {\n+        \"storage\": \"3Gi\"\n+      }\n+    }\n+  }\n+}\n+```\n+\n+### Sample output\n+\n+This example uses HostPath but any provisioner would follow the same flow.\n+\n+First we note there are no Persistent Volumes in the cluster.  After creating a claim, we see a new PV is created\n+and automatically bound to the claim requesting storage.\n+\n+\n+``` \n+$ kubectl get pv\n+\n+$ k create -f examples/experimental/persistent-volume-provisioning/claim1.yaml \n+I1012 13:07:57.666759   22875 decoder.go:141] decoding stream as JSON\n+persistentvolumeclaim \"claim1\" created\n+\n+$ kubectl get pv\n+NAME                LABELS                                   CAPACITY   ACCESSMODES   STATUS    CLAIM            REASON    AGE\n+pv-hostpath-r6z5o   createdby=hostpath-dynamic-provisioner   3Gi        RWO           Bound     default/claim1             2s\n+\n+$ kubectl get pvc\n+NAME      LABELS    STATUS    VOLUME              CAPACITY   ACCESSMODES   AGE\n+claim1    <none>    Bound     pv-hostpath-r6z5o   3Gi        RWO           7s\n+\n+```\n+\n+","path":"examples/experimental/persistent-volume-provisioning/README.md","position":136,"original_position":136,"commit_id":"179f30a40658e7782bb5b8f2c121f514fd9b3feb","original_commit_id":"179f30a40658e7782bb5b8f2c121f514fd9b3feb","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.  I will add.","created_at":"2015-10-14T15:16:22Z","updated_at":"2015-10-14T15:16:22Z","html_url":"https://github.com/kubernetes/kubernetes/pull/14537#discussion_r42007207","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14537","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/42007207"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/14537#discussion_r42007207"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14537"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14537","id":45976921,"html_url":"https://github.com/kubernetes/kubernetes/pull/14537","diff_url":"https://github.com/kubernetes/kubernetes/pull/14537.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/14537.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14537","number":14537,"state":"open","locked":false,"title":"PersistentVolumeController","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":"See #6773 \r\n\r\nAdded support for dynamically provisioning HostPath PVs for test and development.\r\n\r\n@thockin @saad-ali @kubernetes/rh-storage \r\n\r\nThe first commit will drop out when https://github.com/kubernetes/kubernetes/pull/14249 is merged.","created_at":"2015-09-25T04:46:17Z","updated_at":"2015-10-14T15:16:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"decde1ab8eb041f59ea0d219774a909239fd32f2","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/14537/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14537/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14537/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/179f30a40658e7782bb5b8f2c121f514fd9b3feb","head":{"label":"markturansky:pv_provisioner","ref":"pv_provisioner","sha":"179f30a40658e7782bb5b8f2c121f514fd9b3feb","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}","created_at":"2014-09-24T16:55:04Z","updated_at":"2015-05-08T20:34:01Z","pushed_at":"2015-10-13T20:32:57Z","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":117808,"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":"307fbeec3f4743988b0e75581b751baffa6940d6","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-10-14T14:26:07Z","pushed_at":"2015-10-14T15:02:01Z","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":460696,"stargazers_count":10696,"watchers_count":10696,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2708,"mirror_url":null,"open_issues_count":2033,"forks":2708,"open_issues":2033,"watchers":10696,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14537"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/14537"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/14537"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/14537/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14537/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14537/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/179f30a40658e7782bb5b8f2c121f514fd9b3feb"}}}}