{"action":"created","comment":{"url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/comments/194990107","pull_request_review_id":128056451,"id":194990107,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDk5MDEwNw==","diff_hunk":"@@ -109,16 +109,29 @@ func mapAvailabilityDomainToFailureDomain(AD string) string {\n \treturn parts[len(parts)-1]\n }\n \n+func resolveFSType(options controller.VolumeOptions) string {\n+\treturn getFsTypeWithDefault(options.Parameters[\"fsType\"])\n+}\n+\n+func getFsTypeWithDefault(fsType string) string {\n+\tfs := \"ext4\"\n+\tif fsType != \"\" {\n+\t\tfs = fsType\n+\t}\n+\treturn fs\n+}\n+\n // Provision creates a storage asset and returns a PV object representing it.\n func (p *OCIProvisioner) Provision(options controller.VolumeOptions) (*v1.PersistentVolume, error) {\n \tavailabilityDomainName, availabilityDomain, err := p.chooseAvailabilityDomain(options.PVC)\n \tif err != nil {\n \t\treturn nil, err\n \t}\n \n-\tprovisioner, ok := p.storageClassProvisioners[*options.PVC.Spec.StorageClassName]\n+\tfsType := resolveFSType(options)\n+\tprovisioner, ok := p.storageClassProvisioners[fsType]","path":"pkg/provisioner/core/provisioner.go","position":36,"original_position":36,"commit_id":"cf364ffddf2ad6f55edc61be57216a7d4f9b3d76","original_commit_id":"cf364ffddf2ad6f55edc61be57216a7d4f9b3d76","user":{"login":"prydie","id":244160,"node_id":"MDQ6VXNlcjI0NDE2MA==","avatar_url":"https://avatars1.githubusercontent.com/u/244160?v=4","gravatar_id":"","url":"https://api.github.com/users/prydie","html_url":"https://github.com/prydie","followers_url":"https://api.github.com/users/prydie/followers","following_url":"https://api.github.com/users/prydie/following{/other_user}","gists_url":"https://api.github.com/users/prydie/gists{/gist_id}","starred_url":"https://api.github.com/users/prydie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prydie/subscriptions","organizations_url":"https://api.github.com/users/prydie/orgs","repos_url":"https://api.github.com/users/prydie/repos","events_url":"https://api.github.com/users/prydie/events{/privacy}","received_events_url":"https://api.github.com/users/prydie/received_events","type":"User","site_admin":false},"body":"I'm still not overly happy with the overloading of fsType here. For one thing, it means creating multiple copies of the block storage provisioner in `p.storageClassProvisioners` unnecessarily. More importantly, it's not really what I'd expect as a user as throughout Kubernetes `FSType` is used to denote the filesystem type rather than the storage backend:\r\n\r\n```go\r\n\t// Filesystem type to mount.\r\n\t// Must be a filesystem type supported by the host operating system.\r\n\t// Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.\r\n\t// +optional\r\n\tFSType string\r\n```\r\n[Source](https://github.com/kubernetes/kubernetes/blob/60cd056cb443c23b53240d274df4d5abc85c7aaf/pkg/apis/core/types.go#L746)\r\n\r\nI suggest we do something akin to what [hyperkube does with symlinks](https://github.com/kubernetes/kubernetes/blob/master/cluster/images/hyperkube/Dockerfile#L23) in the flexvolume driver DaemonSet and then dispatch on `provisioner` in the StorageClass (i.e. `oracle/oci-block-storage` / `oracle/oci-filesystem-storage`).","created_at":"2018-06-13T08:09:43Z","updated_at":"2018-06-13T08:09:51Z","html_url":"https://github.com/oracle/oci-volume-provisioner/pull/135#discussion_r194990107","pull_request_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/135","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/comments/194990107"},"html":{"href":"https://github.com/oracle/oci-volume-provisioner/pull/135#discussion_r194990107"},"pull_request":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/135"}}},"pull_request":{"url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/135","id":194304784,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MzA0Nzg0","html_url":"https://github.com/oracle/oci-volume-provisioner/pull/135","diff_url":"https://github.com/oracle/oci-volume-provisioner/pull/135.diff","patch_url":"https://github.com/oracle/oci-volume-provisioner/pull/135.patch","issue_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/135","number":135,"state":"open","locked":false,"title":"Use storage class fsType parameter to dispatch custom logic","user":{"login":"harveylowndes","id":16415876,"node_id":"MDQ6VXNlcjE2NDE1ODc2","avatar_url":"https://avatars2.githubusercontent.com/u/16415876?v=4","gravatar_id":"","url":"https://api.github.com/users/harveylowndes","html_url":"https://github.com/harveylowndes","followers_url":"https://api.github.com/users/harveylowndes/followers","following_url":"https://api.github.com/users/harveylowndes/following{/other_user}","gists_url":"https://api.github.com/users/harveylowndes/gists{/gist_id}","starred_url":"https://api.github.com/users/harveylowndes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harveylowndes/subscriptions","organizations_url":"https://api.github.com/users/harveylowndes/orgs","repos_url":"https://api.github.com/users/harveylowndes/repos","events_url":"https://api.github.com/users/harveylowndes/events{/privacy}","received_events_url":"https://api.github.com/users/harveylowndes/received_events","type":"User","site_admin":false},"body":"Resolves #131 ","created_at":"2018-06-12T14:43:27Z","updated_at":"2018-06-13T08:09:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff26b48f4e1273e8e361785feb624e602b744408","assignee":null,"assignees":[],"requested_reviewers":[{"login":"garthy","id":1085290,"node_id":"MDQ6VXNlcjEwODUyOTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1085290?v=4","gravatar_id":"","url":"https://api.github.com/users/garthy","html_url":"https://github.com/garthy","followers_url":"https://api.github.com/users/garthy/followers","following_url":"https://api.github.com/users/garthy/following{/other_user}","gists_url":"https://api.github.com/users/garthy/gists{/gist_id}","starred_url":"https://api.github.com/users/garthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garthy/subscriptions","organizations_url":"https://api.github.com/users/garthy/orgs","repos_url":"https://api.github.com/users/garthy/repos","events_url":"https://api.github.com/users/garthy/events{/privacy}","received_events_url":"https://api.github.com/users/garthy/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":684479486,"node_id":"MDU6TGFiZWw2ODQ0Nzk0ODY=","url":"https://api.github.com/repos/oracle/oci-volume-provisioner/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/135/commits","review_comments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/135/comments","review_comment_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/135/comments","statuses_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/statuses/cf364ffddf2ad6f55edc61be57216a7d4f9b3d76","head":{"label":"oracle:use-storageclass-fstype-to-dispatch-custom-logic","ref":"use-storageclass-fstype-to-dispatch-custom-logic","sha":"cf364ffddf2ad6f55edc61be57216a7d4f9b3d76","user":{"login":"oracle","id":4430336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MzAzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4430336?v=4","gravatar_id":"","url":"https://api.github.com/users/oracle","html_url":"https://github.com/oracle","followers_url":"https://api.github.com/users/oracle/followers","following_url":"https://api.github.com/users/oracle/following{/other_user}","gists_url":"https://api.github.com/users/oracle/gists{/gist_id}","starred_url":"https://api.github.com/users/oracle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oracle/subscriptions","organizations_url":"https://api.github.com/users/oracle/orgs","repos_url":"https://api.github.com/users/oracle/repos","events_url":"https://api.github.com/users/oracle/events{/privacy}","received_events_url":"https://api.github.com/users/oracle/received_events","type":"Organization","site_admin":false},"repo":{"id":102543996,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI1NDM5OTY=","name":"oci-volume-provisioner","full_name":"oracle/oci-volume-provisioner","owner":{"login":"oracle","id":4430336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MzAzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4430336?v=4","gravatar_id":"","url":"https://api.github.com/users/oracle","html_url":"https://github.com/oracle","followers_url":"https://api.github.com/users/oracle/followers","following_url":"https://api.github.com/users/oracle/following{/other_user}","gists_url":"https://api.github.com/users/oracle/gists{/gist_id}","starred_url":"https://api.github.com/users/oracle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oracle/subscriptions","organizations_url":"https://api.github.com/users/oracle/orgs","repos_url":"https://api.github.com/users/oracle/repos","events_url":"https://api.github.com/users/oracle/events{/privacy}","received_events_url":"https://api.github.com/users/oracle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oracle/oci-volume-provisioner","description":"The OCI Volume Provisioner enables dynamic provisioning of storage resources when running Kubernetes on Oracle Cloud Infrastructure","fork":false,"url":"https://api.github.com/repos/oracle/oci-volume-provisioner","forks_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/forks","keys_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/teams","hooks_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/hooks","issue_events_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/events","assignees_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/tags","blobs_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/languages","stargazers_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/stargazers","contributors_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/contributors","subscribers_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/subscribers","subscription_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/subscription","commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/merges","archive_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/downloads","issues_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/releases{/id}","deployments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/deployments","created_at":"2017-09-06T00:39:39Z","updated_at":"2018-06-12T08:32:20Z","pushed_at":"2018-06-12T15:13:01Z","git_url":"git://github.com/oracle/oci-volume-provisioner.git","ssh_url":"git@github.com:oracle/oci-volume-provisioner.git","clone_url":"https://github.com/oracle/oci-volume-provisioner.git","svn_url":"https://github.com/oracle/oci-volume-provisioner","homepage":"","size":55027,"stargazers_count":9,"watchers_count":9,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":14,"watchers":9,"default_branch":"master"}},"base":{"label":"oracle:master","ref":"master","sha":"42a9bca7419c0b872f4650fc339140387ec72c6d","user":{"login":"oracle","id":4430336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MzAzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4430336?v=4","gravatar_id":"","url":"https://api.github.com/users/oracle","html_url":"https://github.com/oracle","followers_url":"https://api.github.com/users/oracle/followers","following_url":"https://api.github.com/users/oracle/following{/other_user}","gists_url":"https://api.github.com/users/oracle/gists{/gist_id}","starred_url":"https://api.github.com/users/oracle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oracle/subscriptions","organizations_url":"https://api.github.com/users/oracle/orgs","repos_url":"https://api.github.com/users/oracle/repos","events_url":"https://api.github.com/users/oracle/events{/privacy}","received_events_url":"https://api.github.com/users/oracle/received_events","type":"Organization","site_admin":false},"repo":{"id":102543996,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI1NDM5OTY=","name":"oci-volume-provisioner","full_name":"oracle/oci-volume-provisioner","owner":{"login":"oracle","id":4430336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MzAzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4430336?v=4","gravatar_id":"","url":"https://api.github.com/users/oracle","html_url":"https://github.com/oracle","followers_url":"https://api.github.com/users/oracle/followers","following_url":"https://api.github.com/users/oracle/following{/other_user}","gists_url":"https://api.github.com/users/oracle/gists{/gist_id}","starred_url":"https://api.github.com/users/oracle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oracle/subscriptions","organizations_url":"https://api.github.com/users/oracle/orgs","repos_url":"https://api.github.com/users/oracle/repos","events_url":"https://api.github.com/users/oracle/events{/privacy}","received_events_url":"https://api.github.com/users/oracle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oracle/oci-volume-provisioner","description":"The OCI Volume Provisioner enables dynamic provisioning of storage resources when running Kubernetes on Oracle Cloud Infrastructure","fork":false,"url":"https://api.github.com/repos/oracle/oci-volume-provisioner","forks_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/forks","keys_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/teams","hooks_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/hooks","issue_events_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/events","assignees_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/tags","blobs_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/languages","stargazers_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/stargazers","contributors_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/contributors","subscribers_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/subscribers","subscription_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/subscription","commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/merges","archive_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/downloads","issues_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/releases{/id}","deployments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/deployments","created_at":"2017-09-06T00:39:39Z","updated_at":"2018-06-12T08:32:20Z","pushed_at":"2018-06-12T15:13:01Z","git_url":"git://github.com/oracle/oci-volume-provisioner.git","ssh_url":"git@github.com:oracle/oci-volume-provisioner.git","clone_url":"https://github.com/oracle/oci-volume-provisioner.git","svn_url":"https://github.com/oracle/oci-volume-provisioner","homepage":"","size":55027,"stargazers_count":9,"watchers_count":9,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":14,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/135"},"html":{"href":"https://github.com/oracle/oci-volume-provisioner/pull/135"},"issue":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/135"},"comments":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/135/comments"},"review_comments":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/135/comments"},"review_comment":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/135/commits"},"statuses":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/statuses/cf364ffddf2ad6f55edc61be57216a7d4f9b3d76"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"prydie"}}