csi: let constructor take care of setting up cryptsetup (#2312)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-09-06 15:05:59 +02:00 committed by GitHub
parent d3c940a6a0
commit 327315d5de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 10 deletions

View file

@ -40,9 +40,9 @@ type CryptMapper struct {
// New initializes a new CryptMapper with the given kms client and key-encryption-key ID.
// kms is used to fetch data encryption keys for the dm-crypt volumes.
func New(kms keyCreator, mapper deviceMapper) *CryptMapper {
func New(kms keyCreator) *CryptMapper {
return &CryptMapper{
mapper: mapper,
mapper: cryptsetup.New(),
kms: kms,
getDiskFormat: getDiskFormat,
}