Skip to content

Commit 13fceee

Browse files
committed
sync custom-resource-definitions define-environment-variable-container
1 parent 138209a commit 13fceee

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

content/zh-cn/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,12 +611,12 @@ Notice that the field `someRandomField` was pruned.
611611
<!--
612612
This example turned off client-side validation to demonstrate the API server's behavior, by adding
613613
the `--validate=false` command line option.
614-
Because the [OpenAPI validation schemas are also published](#publish-validation-schema-in-openapi-v2)
614+
Because the [OpenAPI validation schemas are also published](#publish-validation-schema-in-openapi)
615615
to clients, `kubectl` also checks for unknown fields and rejects those objects well before they
616616
would be sent to the API server.
617617
-->
618618
本例中通过 `--validate=false` 命令行选项 关闭了客户端的合法性检查以展示 API 服务器的行为,
619-
因为 [OpenAPI 合法性检查模式也会发布到](#publish-validation-schema-in-openapi-v2)
619+
因为 [OpenAPI 合法性检查模式也会发布到](#publish-validation-schema-in-openapi)
620620
客户端,`kubectl` 也会检查未知的字段并在对象被发送到 API
621621
服务器之前就拒绝它们。
622622

@@ -770,12 +770,12 @@ allOf:
770770
<!--
771771
With one of those specification, both an integer and a string validate.
772772

773-
In [Validation Schema Publishing](#publish-validation-schema-in-openapi-v2),
773+
In [Validation Schema Publishing](#publish-validation-schema-in-openapi),
774774
`x-kubernetes-int-or-string: true` is unfolded to one of the two patterns shown above.
775775
-->
776776
在以上两种规约中,整数值和字符串值都会被认为是合法的。
777777

778-
在[合法性检查模式定义的发布时](#publish-validation-schema-in-openapi-v2),
778+
在[合法性检查模式定义的发布时](#publish-validation-schema-in-openapi),
779779
`x-kubernetes-int-or-string: true` 会被展开为上述两种模式之一。
780780

781781
### RawExtension

content/zh-cn/docs/tasks/inject-data-application/define-environment-variable-container.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,21 +155,23 @@ the list. Similarly, avoid circular references.
155155
<!--
156156
## Using environment variables inside of your config
157157
158-
Environment variables that you define in a Pod's configuration can be used
159-
elsewhere in the configuration, for example in commands and arguments that
160-
you set for the Pod's containers.
158+
Environment variables that you define in a Pod's configuration under
159+
`.spec.containers[*].env[*]` can be used elsewhere in the configuration, for
160+
example in commands and arguments that you set for the Pod's containers.
161161
In the example configuration below, the `GREETING`, `HONORIFIC`, and
162162
`NAME` environment variables are set to `Warm greetings to`, `The Most
163-
Honorable`, and `Kubernetes`, respectively. Those environment variables
164-
are then used in the CLI arguments passed to the `env-print-demo`
165-
container.
163+
Honorable`, and `Kubernetes`, respectively. The environment variable
164+
`MESSAGE` combines the set of all these environment variables and then uses it
165+
as a CLI argument passed to the `env-print-demo` container.
166166
-->
167167
## 在配置中使用环境变量 {#using-env-var-inside-of-your-config}
168168
169-
你在 Pod 的配置中定义的环境变量可以在配置的其他地方使用,
170-
例如可用在为 Pod 的容器设置的命令和参数中。
169+
你在 Pod 的配置中定义的、位于 `.spec.containers[*].env[*]` 下的环境变量
170+
可以在配置的其他地方使用,例如可用在为 Pod 的容器设置的命令和参数中。
171171
在下面的示例配置中,环境变量 `GREETING`、`HONORIFIC` 和 `NAME` 分别设置为 `Warm greetings to`、
172-
`The Most Honorable` 和 `Kubernetes`。然后这些环境变量在传递给容器 `env-print-demo` 的 CLI 参数中使用。
172+
`The Most Honorable` 和 `Kubernetes`。
173+
环境变量 `MESSAGE` 将所有这些环境变量的集合组合起来,
174+
然后再传递给容器 `env-print-demo` 的 CLI 参数中使用。
173175
174176
```yaml
175177
apiVersion: v1

0 commit comments

Comments
 (0)