mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rbd: delete encryption key from KMS
when a Snapshot is encrypted during a CreateSnapshot operation, the encryption key gets created in the KMS when we delete the Snapshot the key from the KMS should also gets deleted. When we create a volume from snapshot we are copying required information but we missed to copy the encryption information, This commit adds the missing information to delete the encryption key. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
e34e3c39aa
commit
c3bae17fce
@ -89,6 +89,10 @@ func generateVolFromSnap(rbdSnap *rbdSnapshot) *rbdVolume {
|
||||
vol.RadosNamespace = rbdSnap.RadosNamespace
|
||||
vol.RbdImageName = rbdSnap.RbdSnapName
|
||||
vol.ImageID = rbdSnap.ImageID
|
||||
// copyEncryptionConfig cannot be used here because the volume and the
|
||||
// snapshot will have the same volumeID which cases the panic in
|
||||
// copyEncryptionConfig function.
|
||||
vol.encryption = rbdSnap.encryption
|
||||
return vol
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user