{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments/124985018","pull_request_review_id":47329188,"id":124985018,"diff_hunk":"@@ -0,0 +1,167 @@\n+---\n+title: Dynamic Provisioning and StorageClass API\n+---\n+\n+With PV and PVCs one can only provision storage statically i.e. PVs first needs to be created before a Pod claims it. However with StorageClass API Kubernetes enables dynamic volume provisioning which is very unique to Kubernetes. This avoids pre-provisioning of storage and storage is provisioned automatically when a user requests it. \n+ \n+StorageClass API object specifies a provisioner and parameters  which are used to decide which volume plugin to be used and provisioner specific parameters.\n+Provisioner could be AWS EBS, vSphere, OpenStack and so on.\n+ \n+vSphere is one of the provisioners and it allows following parameters:\n+\n+**Diskformat** which can be thin(default), zeroedthick and eagerzeroedthick\n+\n+**Datastores** is an optional field which can be VMFSDatastore or VSANDatastore. This allows user to select the datastore to provision PV from, if not specified the default datastore from vSphere config file is used.\n+\n+**storagepolicyName** Name of the SPBM policy to be applied. The newly created persistent volume will have the SPBM policy configured with it.\n+VSAN storage capability parameters which you can specify explicitly. The newly created persistent volume will have these VSAN storage capabilities configured with it. (TODO - Add link to the section)\n+ \n+There are additional parameters which are covered in Storage Policy Management section.\n+\n+**Note:**\n+\n+All the example yamls can be found [here](https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/vsphere) unless otherwise specified. Please download these examples.\n+\n+Let us look at an example of how to use StorageClass for dynamic provisioning\n+**Note:** Here you don't need to create vmdk it is created dynamically.\n+\n+**Create Storage Class**\n+\n+```\n+vpshere-volume-sc-fast.yaml\n+kind: StorageClass\n+apiVersion: storage.k8s.io/v1\n+metadata:\n+  name: fast\n+provisioner: kubernetes.io/vsphere-volume\n+parameters:\n+    diskformat: zeroedthick\n+    fstype:     ext3\n+```\n+\n+You can also specify the datastore in the Storageclass as shown in example 2. The volume will be created on the datastore specified in the storage class. This field is optional. If not specified as shown in example 1, the volume will be created on the datastore specified in the vsphere config file used to initialize the vSphere Cloud Provider.\n+\n+```\n+vsphere-volume-sc-slow.yaml\n+kind: StorageClass\n+apiVersion: storage.k8s.io/v1\n+metadata:\n+  name: fast\n+provisioner: kubernetes.io/vsphere-volume\n+parameters:\n+    diskformat: zeroedthick\n+    datastore: VSANDatastore\n+If datastore is member of DataStore Cluster or within some sub folder, the datastore folder path needs to be provided in the datastore parameter as below.","path":"kubernetes-docs/sc.md","position":54,"original_position":54,"commit_id":"ce9a8947ba9e7886c90a999a0c3afea67bf13028","original_commit_id":"ce9a8947ba9e7886c90a999a0c3afea67bf13028","user":{"login":"girishshilamkar","id":2070517,"avatar_url":"https://avatars2.githubusercontent.com/u/2070517?v=3","gravatar_id":"","url":"https://api.github.com/users/girishshilamkar","html_url":"https://github.com/girishshilamkar","followers_url":"https://api.github.com/users/girishshilamkar/followers","following_url":"https://api.github.com/users/girishshilamkar/following{/other_user}","gists_url":"https://api.github.com/users/girishshilamkar/gists{/gist_id}","starred_url":"https://api.github.com/users/girishshilamkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girishshilamkar/subscriptions","organizations_url":"https://api.github.com/users/girishshilamkar/orgs","repos_url":"https://api.github.com/users/girishshilamkar/repos","events_url":"https://api.github.com/users/girishshilamkar/events{/privacy}","received_events_url":"https://api.github.com/users/girishshilamkar/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2017-06-30T08:06:50Z","updated_at":"2017-06-30T08:06:50Z","html_url":"https://github.com/vmware/docker-volume-vsphere/pull/1514#discussion_r124985018","pull_request_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/1514","_links":{"self":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments/124985018"},"html":{"href":"https://github.com/vmware/docker-volume-vsphere/pull/1514#discussion_r124985018"},"pull_request":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/1514"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/1514","id":128199837,"html_url":"https://github.com/vmware/docker-volume-vsphere/pull/1514","diff_url":"https://github.com/vmware/docker-volume-vsphere/pull/1514.diff","patch_url":"https://github.com/vmware/docker-volume-vsphere/pull/1514.patch","issue_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/1514","number":1514,"state":"open","locked":false,"title":"First commit for Kubernetes vSphere Cloud Provider docs","user":{"login":"girishshilamkar","id":2070517,"avatar_url":"https://avatars2.githubusercontent.com/u/2070517?v=3","gravatar_id":"","url":"https://api.github.com/users/girishshilamkar","html_url":"https://github.com/girishshilamkar","followers_url":"https://api.github.com/users/girishshilamkar/followers","following_url":"https://api.github.com/users/girishshilamkar/following{/other_user}","gists_url":"https://api.github.com/users/girishshilamkar/gists{/gist_id}","starred_url":"https://api.github.com/users/girishshilamkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girishshilamkar/subscriptions","organizations_url":"https://api.github.com/users/girishshilamkar/orgs","repos_url":"https://api.github.com/users/girishshilamkar/repos","events_url":"https://api.github.com/users/girishshilamkar/events{/privacy}","received_events_url":"https://api.github.com/users/girishshilamkar/received_events","type":"User","site_admin":false},"body":"There are two commits feel free to discard the static website commit. As you can generate the html files using the same procedure used for vDVS docs and copying to folder kubernetes if we want the url to be vmware.github.io/docker-volume-vsphere/kubernetes","created_at":"2017-06-29T16:54:55Z","updated_at":"2017-06-30T08:06:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0315ebd9eee60b56904360901b03d24cdb9c2245","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/1514/commits","review_comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/1514/comments","review_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/1514/comments","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/ce9a8947ba9e7886c90a999a0c3afea67bf13028","head":{"label":"infracloudio:gh-pages","ref":"gh-pages","sha":"ce9a8947ba9e7886c90a999a0c3afea67bf13028","user":{"login":"infracloudio","id":19493636,"avatar_url":"https://avatars3.githubusercontent.com/u/19493636?v=3","gravatar_id":"","url":"https://api.github.com/users/infracloudio","html_url":"https://github.com/infracloudio","followers_url":"https://api.github.com/users/infracloudio/followers","following_url":"https://api.github.com/users/infracloudio/following{/other_user}","gists_url":"https://api.github.com/users/infracloudio/gists{/gist_id}","starred_url":"https://api.github.com/users/infracloudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infracloudio/subscriptions","organizations_url":"https://api.github.com/users/infracloudio/orgs","repos_url":"https://api.github.com/users/infracloudio/repos","events_url":"https://api.github.com/users/infracloudio/events{/privacy}","received_events_url":"https://api.github.com/users/infracloudio/received_events","type":"Organization","site_admin":false},"repo":{"id":95760249,"name":"docker-volume-vsphere","full_name":"infracloudio/docker-volume-vsphere","owner":{"login":"infracloudio","id":19493636,"avatar_url":"https://avatars3.githubusercontent.com/u/19493636?v=3","gravatar_id":"","url":"https://api.github.com/users/infracloudio","html_url":"https://github.com/infracloudio","followers_url":"https://api.github.com/users/infracloudio/followers","following_url":"https://api.github.com/users/infracloudio/following{/other_user}","gists_url":"https://api.github.com/users/infracloudio/gists{/gist_id}","starred_url":"https://api.github.com/users/infracloudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infracloudio/subscriptions","organizations_url":"https://api.github.com/users/infracloudio/orgs","repos_url":"https://api.github.com/users/infracloudio/repos","events_url":"https://api.github.com/users/infracloudio/events{/privacy}","received_events_url":"https://api.github.com/users/infracloudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infracloudio/docker-volume-vsphere","description":"vSphere Docker Volume Service","fork":true,"url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere","forks_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/forks","keys_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/teams","hooks_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/hooks","issue_events_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/events","assignees_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/tags","blobs_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/languages","stargazers_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/stargazers","contributors_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/contributors","subscribers_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/subscribers","subscription_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/subscription","commits_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/merges","archive_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/downloads","issues_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/infracloudio/docker-volume-vsphere/deployments","created_at":"2017-06-29T09:14:46Z","updated_at":"2017-06-29T09:14:48Z","pushed_at":"2017-06-29T16:29:05Z","git_url":"git://github.com/infracloudio/docker-volume-vsphere.git","ssh_url":"git@github.com:infracloudio/docker-volume-vsphere.git","clone_url":"https://github.com/infracloudio/docker-volume-vsphere.git","svn_url":"https://github.com/infracloudio/docker-volume-vsphere","homepage":"https://vmware.github.io/docker-volume-vsphere","size":17876,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"vmware:gh-pages","ref":"gh-pages","sha":"2c93008f53964b4f41db7c9c00db3810b0a18b3b","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars3.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49599693,"name":"docker-volume-vsphere","full_name":"vmware/docker-volume-vsphere","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars3.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/docker-volume-vsphere","description":"vSphere Docker Volume Service","fork":false,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere","forks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/forks","keys_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/teams","hooks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/hooks","issue_events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/events","assignees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/tags","blobs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/languages","stargazers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/stargazers","contributors_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contributors","subscribers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscribers","subscription_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscription","commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/merges","archive_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/downloads","issues_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/deployments","created_at":"2016-01-13T20:25:36Z","updated_at":"2017-06-29T16:06:37Z","pushed_at":"2017-06-30T07:38:33Z","git_url":"git://github.com/vmware/docker-volume-vsphere.git","ssh_url":"git@github.com:vmware/docker-volume-vsphere.git","clone_url":"https://github.com/vmware/docker-volume-vsphere.git","svn_url":"https://github.com/vmware/docker-volume-vsphere","homepage":"https://vmware.github.io/docker-volume-vsphere","size":17411,"stargazers_count":145,"watchers_count":145,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":43,"mirror_url":null,"open_issues_count":193,"forks":43,"open_issues":193,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/1514"},"html":{"href":"https://github.com/vmware/docker-volume-vsphere/pull/1514"},"issue":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/1514"},"comments":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/1514/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/1514/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/1514/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/ce9a8947ba9e7886c90a999a0c3afea67bf13028"}}}}
{"actor":{"display_login":"girishshilamkar"}}