Closed avestuk closed 6 months ago
@srust There are no current e2e tests for LUKS and I believe that the e2e tests are currently broken - https://github.com/linode/linode-blockstorage-csi-driver/issues/129
Adding unit tests should be possible but it'll require more changes to functions and I wanted to keep this somewhat scope limited. I can commit to writing the unit tests but I'd suggest we not block on them.
EDIT: You can test directly using my prebuilt container off the last commit on this branch ghcr.io/avestuk/linode-blockstorage-csi-driver:helm-v0.6.3-5-g763d4d2
Adding unit tests should be possible but it'll require more changes to functions and I wanted to keep this somewhat scope limited. I can commit to writing the unit tests but I'd suggest we not block on them.
Fair!
General:
Pull Request Guidelines:
Provides a fix for #158 by providing the encryption key on stdin rather than writing it to disk. This eliminates the requirement for
/tmp
to be a tmpfs as we just don't write the key to disk at all.I've also made a few other changes to make the code a little more idiomatic.
Adding unit tests is doable - cryptsetup will create a loopback device if we target a file instead of a block device, we'd need to make further changes in order to make the functions unit testable. I'll raise a separate issue for doing this.
Can be tested using following manifests and the container ghcr.io/avestuk/linode-blockstorage-csi-driver:helm-v0.6.3-5-g763d4d2
Logs showing successful running of commands shown below