cleanup: use constant for "vault" KMS-type

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-12-14 11:26:31 +01:00 committed by mergify[bot]
parent 6e2d16ed1e
commit db15458d16
2 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,7 @@ func GetKMS(tenant, kmsID string, secrets map[string]string) (EncryptionKMS, err
} }
switch kmsType { switch kmsType {
case "vault": case kmsTypeVault:
return InitVaultKMS(kmsID, kmsConfig, secrets) return InitVaultKMS(kmsID, kmsConfig, secrets)
case kmsTypeVaultTokens: case kmsTypeVaultTokens:
return InitVaultTokensKMS(tenant, kmsID, kmsConfig, secrets) return InitVaultTokensKMS(tenant, kmsID, kmsConfig, secrets)

View File

@ -31,6 +31,8 @@ import (
) )
const ( const (
kmsTypeVault = "vault"
// path to service account token that will be used to authenticate with Vault // path to service account token that will be used to authenticate with Vault
// #nosec // #nosec
serviceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token" serviceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token"