mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
Set namespace on vault client if VAULT_NAMESPACE env is set (#6867)
This commit is contained in:
@@ -192,6 +192,11 @@ func NewVault(kmsConf KMSConfig) (KMS, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if ns, ok := os.LookupEnv("VAULT_NAMESPACE"); ok {
|
||||
c.SetNamespace(ns)
|
||||
}
|
||||
|
||||
accessToken, leaseDuration, err := getVaultAccessToken(c, config.Auth.AppRole.ID, config.Auth.AppRole.Secret)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user