Adding more detail on how flattened values work when multiValued = true.

This commit is contained in:
Phil Kedy 2021-08-25 14:14:48 -04:00
parent cdbd1f9c01
commit 38f7a24f62
1 changed files with 26 additions and 1 deletions

View File

@ -45,7 +45,7 @@ spec:
## Setup JSON file to hold the secrets
Given the following json:
Given the following JSON loaded from `secretsFile`:
```json
{
@ -82,6 +82,31 @@ If `multiValued` is `"true"`, you would instead use the top level key. In this e
}
```
Nested structures after the top level will be flattened. In this example, `connectionStrings` would return the following map:
JSON from `secretsFile`:
```json
{
"redisPassword": "your redis password",
"connectionStrings": {
"mysql": {
"username": "your mysql username",
"password": "your mysql password"
}
}
}
```
Response:
```json
{
"mysql:username": "your mysql username",
"mysql:password": "your mysql password"
}
```
This is useful in order to mimic secret stores like Vault or Kubernetes that return multiple key/value pairs per secret key.
## Related links