You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
completionMode 指定如何跟踪 Pod 完成情况。它可以是 `NonIndexed`(默认)或者 `Indexed`。
127
127
128
-
`NonIndexed` 表示当有 `.spec.completions` 个成功完成的 Pod 时,认为 Job 完成。每个 Pod 完成都是彼此同源的。
128
+
`NonIndexed` 表示当有 `.spec.completions` 个成功完成的 Pod 时,认为 Job 完成。
129
+
每个 Pod 完成都是彼此同源的。
129
130
130
131
<!--
131
132
`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.
@@ -144,23 +145,37 @@ JobSpec 描述了任务执行的情况。
144
145
145
146
将来可能添加更多的完成模式。如果 Job 控制器发现它无法识别的模式
146
147
(这种情况在升级期间由于版本偏差可能发生),则控制器会跳过 Job 的更新。
148
+
149
+
<!--
150
+
Possible enum values:
151
+
- `"Indexed"` is a Job completion mode. In this mode, the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1). The Job is considered complete when a Pod completes for each completion index.
152
+
- `"NonIndexed"` is a Job completion mode. In this mode, the Job is considered complete when there have been .spec.completions successfully completed Pods. Pod completions are homologous to each other.
153
+
-->
154
+
155
+
可能的枚举值:
156
+
-`"Indexed"` 是一种 Job 完成模式。在此模式下,Job 的 Pod 会获得一个从 0 到
157
+
`.spec.completions - 1` 的关联完成索引值。当每个完成索引值都有一个 Pod 完成时,
Specifies the number of retries before marking this job failed. Defaults to 6
165
+
Specifies the number of retries before marking this job failed. Defaults to 6, unless backoffLimitPerIndex (only Indexed Job) is specified. When backoffLimitPerIndex is specified, backoffLimit defaults to 2147483647.
152
166
153
167
- **activeDeadlineSeconds** (int64)
154
168
155
169
Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.
Pod 失效策略规则的列表。这些规则按顺序进行评估。一旦某规则匹配 Pod 失效,则其余规将被忽略。
252
267
当没有规则匹配 Pod 失效时,将应用默认的处理方式:
253
-
Pod 失效的计数器递增并针对 backoffLimit 进行检查。最多允许 20 个。
268
+
Pod 失效的计数器递增并针对 `backoffLimit` 进行检查。最多允许 20 个。
254
269
255
270
<!--
256
271
<a name="PodFailurePolicyRule"></a>
@@ -301,6 +316,26 @@ JobSpec 描述了任务执行的情况。
301
316
302
317
指定必需的 Pod 状况类型。要匹配一个 Pod 状况,指定的类型必须等于该 Pod 状况类型。
303
318
319
+
<!--
320
+
Possible enum values:
321
+
- `"Count"` This is an action which might be taken on a pod failure - the pod failure is handled in the default way - the counter towards .backoffLimit, represented by the job's .status.failed field, is incremented.
322
+
- `"FailIndex"` This is an action which might be taken on a pod failure - mark the Job's index as failed to avoid restarts within this index. This action can only be used when backoffLimitPerIndex is set.
323
+
- `"FailJob"` This is an action which might be taken on a pod failure - mark the pod's job as Failed and terminate all running pods.
324
+
- `"Ignore"` This is an action which might be taken on a pod failure - the counter towards .backoffLimit, represented by the job's .status.failed field, is not incremented and a replacement pod is created.
successPolicy specifies the policy when the Job can be declared as succeeded. If empty, the default behavior applies - the Job is declared as succeeded only when the number of succeeded pods equals to the completions. When the field is specified, it must be immutable and works only for the Indexed Jobs. Once the Job meets the SuccessPolicy, the lingering pods are terminated.
rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
476
+
rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SuccessCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
- TerminatingOrFailed:表示当 Pod 处于终止中(具有 metadata.deletionTimestamp)或失败时,重新创建 Pod。
536
-
- Failed:表示在创建替代的 Pod 之前,等待先前创建的 Pod 完全终止(处于 Failed 或 Succeeded 阶段)。
579
+
-`TerminatingOrFailed`:表示当 Pod 处于终止中(具有 `metadata.deletionTimestamp`)或失败时,重新创建 Pod。
580
+
-`Failed`:表示在创建替代的 Pod 之前,等待先前创建的 Pod 完全终止(处于 Failed 或 Succeeded 阶段)。
537
581
538
582
<!--
539
-
When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default.
583
+
When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field.
0 commit comments