From ba42647f12ab59d894106237cc9ecd9da0f905e6 Mon Sep 17 00:00:00 2001 From: Artem Vysochyn Date: Fri, 23 Oct 2020 12:43:19 +0300 Subject: [PATCH] Added support of VAULT_MOUNT_POINT at KubernetesVaultTokenSupplier --- .../scalecube/config/vault/KubernetesVaultTokenSupplier.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config-vault/src/main/java/io/scalecube/config/vault/KubernetesVaultTokenSupplier.java b/config-vault/src/main/java/io/scalecube/config/vault/KubernetesVaultTokenSupplier.java index 97877347..b3877eaf 100644 --- a/config-vault/src/main/java/io/scalecube/config/vault/KubernetesVaultTokenSupplier.java +++ b/config-vault/src/main/java/io/scalecube/config/vault/KubernetesVaultTokenSupplier.java @@ -18,7 +18,9 @@ public class KubernetesVaultTokenSupplier implements VaultTokenSupplier { private String vaultRole = ENVIRONMENT_LOADER.loadVariable("VAULT_ROLE"); private String vaultJwtProvider = - Optional.ofNullable(ENVIRONMENT_LOADER.loadVariable("VAULT_JWT_PROVIDER")) + Optional.ofNullable( + Optional.ofNullable(ENVIRONMENT_LOADER.loadVariable("VAULT_JWT_PROVIDER")) + .orElse(ENVIRONMENT_LOADER.loadVariable("VAULT_MOUNT_POINT"))) .orElse("kubernetes"); private String serviceAccountTokenPath =