Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Enable support for encrypted volumes for CSI driver #299

Merged
merged 45 commits into from
Nov 13, 2024

Conversation

prajwalvathreya
Copy link
Contributor

@prajwalvathreya prajwalvathreya commented Oct 30, 2024

General:

This PR focuses on enabling support for encrypted volumes for the CSI driver.

It addresses the following tasks:

  • creating an encrypted volume (region specific)
  • attaching the volume to a node (region specific)
  • handling errors in case of mismatch in attaching a volume to a node
  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?
  8. Have you linked your PR to an open issue

- to check if region allows encryption

- prepare the volume creation request with updated params

- added helper function `isEncryptionSupported` to dynamically check for regions

- updated attach volume operation logic to check if the created volume and the linode it's being attached to is in the same region(only for encrypted volumes this is enforced)
- removed new storage class and edited pre-existing ones
@prajwalvathreya prajwalvathreya changed the title volume-encryption [feat] Enable support for encrypted volumes for CSI driver Oct 31, 2024
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 84.28571% with 11 lines in your changes missing coverage. Please review.

Project coverage is 74.79%. Comparing base (c523c92) to head (02a5bd1).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/driver/controllerserver_helper.go 83.58% 8 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #299      +/-   ##
==========================================
+ Coverage   73.68%   74.79%   +1.10%     
==========================================
  Files          22       22              
  Lines        2356     2396      +40     
==========================================
+ Hits         1736     1792      +56     
+ Misses        522      499      -23     
- Partials       98      105       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@prajwalvathreya prajwalvathreya marked this pull request as ready for review November 5, 2024 19:31
@prajwalvathreya prajwalvathreya requested a review from a team as a code owner November 5, 2024 19:31
helm-chart/csi-driver/templates/linode-block-storage.yaml Outdated Show resolved Hide resolved
helm-chart/csi-driver/values.yaml Outdated Show resolved Hide resolved
internal/driver/controllerserver.go Outdated Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
internal/driver/controllerserver_helper.go Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
docs/encrypted-drives.md Outdated Show resolved Hide resolved
helm-chart/csi-driver/templates/linode-block-storage.yaml Outdated Show resolved Hide resolved
docs/encrypted-drives.md Show resolved Hide resolved
docs/encrypted-drives.md Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
internal/driver/controllerserver_helper.go Outdated Show resolved Hide resolved
Copy link
Contributor

@komer3 komer3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this! Looks good to me

@prajwalvathreya prajwalvathreya merged commit c31c62d into main Nov 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants