Merge pull request #49045 from Eason1118/patch-5

[zh-cn] Update job.md 2.0
pull/49048/head
Kubernetes Prow Robot 2024-12-12 12:38:26 +01:00 committed by GitHub
commit 83469fc63a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 7 deletions

View File

@ -1227,13 +1227,14 @@ Pod 终结器Job 控制器就会给 Job 添加 `Complete` 或 `Failed` 终止
<!--
In Kubernetes v1.31 and later, the controller only adds the Job terminal conditions
_after_ all of the Pods are terminated. You can enable this behavior by using the
`JobManagedBy` or the `JobPodReplacementPolicy` (enabled by default)
_after_ all of the Pods are terminated. You can control this behavior by using the
`JobManagedBy` and the `JobPodReplacementPolicy` (both enabled by default)
[feature gates](/docs/reference/command-line-tools-reference/feature-gates/).
-->
在 Kubernetes v1.31 及更高版本中,控制器仅在所有 Pod 终止后添加 Job 终止状况。
你可以使用 `JobManagedBy``JobPodReplacementPolicy`(默认启用)
启用此行为的[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)。
在 Kubernetes v1.31 及更高版本中,控制器仅在所有 Pod 都终止**之后**才会添加作业Job的终止条件。
你可以通过使用 `JobManagedBy``JobPodReplacementPolicy`(都默认启用)
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
来控制这一行为。
<!--
### Termination of Job pods
@ -1975,10 +1976,10 @@ status:
<!--
You can only set the `managedBy` field on Jobs if you enable the `JobManagedBy`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
(disabled by default).
(enabled by default).
-->
你只有在启用了 `JobManagedBy`
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)(默认禁用)时,
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)(默认开启)时,
才可以在 Job 上设置 `managedBy` 字段。
{{< /note >}}