Closed darkowlzz closed 5 years ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: darkowlzz To fully approve this pull request, please assign additional approvers. We suggest the following additional approver: chakri-nelluri
If they are not already assigned, you can assign the PR to them by writing /assign @chakri-nelluri
in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Wow, that was fast. Thanks a lot @darkowlzz.
Before this can be merged we need to get the hostpath driver moved (https://github.com/kubernetes-csi/csi-driver-host-path/pull/1) and then also move this PR. In the meantime we can discuss it here.
@lpabon: I remember that you were raising the question of handling block devices with symlinks vs. bind mounts. What was the outcome? Is the approach taken here correct?
/hold
I'm holding this because we don't want to add any further changes here. It's still ready for review.
@darkowlzz Please move this PR over to the csi-driver-host-path repo. The code was merged into master of that repo.
This change adds block volume support to hostpath driver.
When a block volume request is received, a block file is created at provisionRoot with the requested capacity as size.
At node publish, a loop device is created associated with the block file. This loop device is then symlinked to the publish target path. For read only volume publish, the loop device is created with read only flag.
At node unpublish, the symlinked file is deleted, and the loop device is detached from the block file.
At volume delete, the block file is deleted.