docs: Clarify `substituteFrom` overwrite order

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan 2025-07-17 09:00:56 +03:00
parent ba3c16aa45
commit 2fb1fa3890
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF
1 changed files with 4 additions and 4 deletions

View File

@ -699,7 +699,7 @@ spec:
# Fail if this Secret does not exist.
```
**Note:** For substituting variables in a secret, `.spec.stringData` field must be used i.e:
For substituting variables in a secret, `.spec.stringData` field must be used i.e:
```yaml
---
@ -713,11 +713,11 @@ stringData:
token: ${token}
```
**Note:** The var values which are specified in-line with `substitute`
The var values which are specified in-line with `substitute`
take precedence over the ones derived from `substituteFrom`.
When var values for the same variable keys are derived from multiple
`ConfigMaps` or `Secrets` referenced in the `substituteFrom` list, then the
first take precedence over the later values.
`ConfigMaps` or `Secrets` referenced in the `substituteFrom` list,
the later values overwrite earlier values.
**Note:** If you want to avoid var substitutions in scripts embedded in
ConfigMaps or container commands, you must use the format `$var` instead of