util: make parseTenantConfig() usable for modular KMSs

parseTenantConfig() only allowed configuring a defined set of options,
and KMSs were not able to re-use the implementation. Now, the function
parses the ConfigMap from the Tenants Namespace and returns a map with
options that the KMS supports.

The map that parseTenantConfig() returns can be inspected by the KMS,
and applied to the vaultTenantConnection type by calling parseConfig().

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos
2021-07-13 12:59:29 +02:00
committed by mergify[bot]
parent 96bb8bfd0e
commit d941e5abac
4 changed files with 142 additions and 58 deletions

View File

@ -20,3 +20,4 @@ metadata:
name: ceph-csi-kms-config
data:
vaultBackendPath: tenant
vaultRole: ceph-csi-tenant