mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
util: add EncryptionKMS.Destroy()
Add a new method to the EncryptionKMS interface so that resources can be freed when EncryptionKMS instances get freed. With the move to using the libopenstorage API, a temporary file needs to store the optional CA certificate. The Destroy() method of the vaultConnection type now removes this file. The rbdVolume uses the EncryptionKMS type now, so call the new Destroy() method from withing rbdVolume.Destroy(). Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
eb1ef69cfb
commit
8f91c672d4
@ -169,6 +169,9 @@ func (rv *rbdVolume) Destroy() {
|
||||
if rv.conn != nil {
|
||||
rv.conn.Destroy()
|
||||
}
|
||||
if rv.KMS != nil {
|
||||
rv.KMS.Destroy()
|
||||
}
|
||||
}
|
||||
|
||||
// String returns the image-spec (pool/{namespace/}image) format of the image.
|
||||
|
Reference in New Issue
Block a user