mirror of https://github.com/dapr/docs.git
Adding more detail on how flattened values work when multiValued = true.
This commit is contained in:
parent
cdbd1f9c01
commit
38f7a24f62
|
@ -45,7 +45,7 @@ spec:
|
||||||
|
|
||||||
## Setup JSON file to hold the secrets
|
## Setup JSON file to hold the secrets
|
||||||
|
|
||||||
Given the following json:
|
Given the following JSON loaded from `secretsFile`:
|
||||||
|
|
||||||
```json
|
```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.
|
This is useful in order to mimic secret stores like Vault or Kubernetes that return multiple key/value pairs per secret key.
|
||||||
|
|
||||||
## Related links
|
## Related links
|
||||||
|
|
Loading…
Reference in New Issue