rbd: set tenant in kms object

the tenant/namespace is needed to read the certificates,
this commit sets the tenant in kms object.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-02-03 16:54:13 +05:30 committed by mergify[bot]
parent 22ae4a0b16
commit bf5c36822f

View File

@ -172,6 +172,7 @@ type VaultTokensKMS struct {
// InitVaultTokensKMS returns an interface to HashiCorp Vault KMS.
func InitVaultTokensKMS(tenant, kmsID string, config map[string]interface{}) (EncryptionKMS, error) {
kms := &VaultTokensKMS{}
kms.Tenant = tenant
err := kms.initConnection(kmsID, config)
if err != nil {
return nil, fmt.Errorf("failed to initialize Vault connection: %w", err)