yunify / qingcloud-csi

Kubernetes volume plugin based on CSI specification which support block storage of qingcloud
Apache License 2.0
36 stars 22 forks source link

Support block volume mode PVC #195

Closed dkeven closed 2 years ago

dkeven commented 2 years ago

Signed-off-by: dkeven keven@kubesphere.io

What type of PR is this? /kind api-change

What this PR does / why we need it:

This PR adds suppport for PVCs whose volumeMode is block, which is not supported before.

dkeven commented 2 years ago

/cc @stoneshi-yunify @f10atin9

dkeven commented 2 years ago

@stoneshi-yunify Thanks for your detailed review, I've updated the code as suggested.

see my comments. Make sure new code does not break old FS volume logic.

I've tested both the FS and Block mode, and they works correctly.

what's the meaning of this comment?

Can't reply in the thread as new commit's been force-pushed.

Some linters, like gosec, don't allow creating file whose path is a variable, this comment disables the check.

As we don't do this kind of linting, I think it's okay to remove this comment.