Skip to content

Add luks encryption support#148

Open
chbmuc wants to merge 17 commits intometal-stack:masterfrom
chbmuc:encryption
Open

Add luks encryption support#148
chbmuc wants to merge 17 commits intometal-stack:masterfrom
chbmuc:encryption

Conversation

@chbmuc
Copy link
Copy Markdown

@chbmuc chbmuc commented Feb 10, 2026

Description

This PR adds LUKS2 encryption support for volumes (raw block and filesystem).

The test framework has been extended and all tests pass in a local test run.

Closes #29.

@chbmuc chbmuc requested a review from a team as a code owner February 10, 2026 15:50
Copy link
Copy Markdown
Contributor

@majst01 majst01 left a comment

Choose a reason for hiding this comment

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

first small improvements

Co-authored-by: Stefan Majer <stefan.majer@gmail.com>
Copy link
Copy Markdown
Contributor

@Gerrit91 Gerrit91 left a comment

Choose a reason for hiding this comment

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

Cool. Not an expert on this, but looks pretty good from the code perspective.

Copy link
Copy Markdown
Contributor

@majst01 majst01 left a comment

Choose a reason for hiding this comment

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

We are almost there

Copy link
Copy Markdown
Contributor

@ostempel ostempel left a comment

Choose a reason for hiding this comment

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

Really nice feature. Have some feedback for you

@ostempel
Copy link
Copy Markdown
Contributor

thank you very much! I will take a look this week.

Copy link
Copy Markdown
Contributor

@ostempel ostempel left a comment

Choose a reason for hiding this comment

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

Great feature! 🚀

Just small nitpicks for the testing.
Here we can remove the creation and deletion of the encrypted-linear storageclass since it already is deployed through the helm-chart and its custom values.yaml

Otherwise than this we can merge.

Also would be really happy if you add this feature to the associated gardener-extension-csi-driver-lvm

@chbmuc
Copy link
Copy Markdown
Author

chbmuc commented Apr 8, 2026

PR should be complete now.

I will take a look at the gardener-extension-csi-driver-lvm - no promises... Do you want encryption to be an Opt-In setting or shall we enable it be default?

@Gerrit91
Copy link
Copy Markdown
Contributor

Gerrit91 commented Apr 9, 2026

I will take a look at the gardener-extension-csi-driver-lvm - no promises... Do you want encryption to be an Opt-In setting or shall we enable it be default?

I'd say we should go for opt-in setting in the extension. Higher-level APIs can still implement a different defaulting.

@chbmuc
Copy link
Copy Markdown
Author

chbmuc commented Apr 13, 2026

I have commited metal-stack/gardener-extension-csi-driver-lvm#25 now.

Comment on lines +1 to +13
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: csi-driver-lvm-linear-encrypted
parameters:
type: linear
encryption: "true"
csi.storage.k8s.io/node-stage-secret-name: csi-lvm-encryption-secret
csi.storage.k8s.io/node-stage-secret-namespace: default
provisioner: lvm.csi.metal-stack.io
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this file also can be removed. After that I'm happy to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Filesystem encryption support

4 participants