Skip to content

Commit e3f6541

Browse files
author
Cweiping
committed
Apply suggestions from code review
Signed-off-by: Weiping Cai <[email protected]>
1 parent 1253c3b commit e3f6541

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

content/en/docs/tasks/inject-data-application/define-interdependent-environment-variables.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,18 @@ Pod:
6363

6464
As shown above, you have defined the correct dependency reference of `SERVICE_ADDRESS`, bad dependency reference of `UNCHANGED_REFERENCE` and skip dependent references of `ESCAPED_REFERENCE`.
6565

66-
When the environment variable is defined, you can use it directly. You can use it after the definition is completed, such as `SERVICE_ADDRESS`.
66+
When an environment variable is already defined when being referenced,
67+
the reference can be correctly resolved, such as in the `SERVICE_ADDRESS` case.
6768

68-
When the environment variable is undefined or only includes some variables, the undefined environment variable is treated as a normal string, such as `UNCHANGED_REFERENCE`. A bad reference does not interfere with the operation of the container.
69+
When the environment variable is undefined or only includes some variables, the undefined environment variable is treated as a normal string, such as `UNCHANGED_REFERENCE`. Note that incorrectly parsed environment variables, in general, will not block the container from starting.
6970

70-
The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME).Escaped references will never be expanded, regardless of whether the variable exists or not.
71+
The `$(VAR_NAME)` syntax can be escaped with a double `$`, ie: `$$(VAR_NAME)`.
72+
Escaped references are never expanded, regardless of whether the referenced variable
73+
is defined or not. This can be seen from the `ESCAPED_REFERENCE` case above.
7174

7275
## {{% heading "whatsnext" %}}
7376

7477

7578
* Learn more about [environment variables](/docs/tasks/inject-data-application/environment-variable-expose-pod-information/).
7679
* See [EnvVarSource](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#envvarsource-v1-core).
7780

78-

0 commit comments

Comments
 (0)