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
Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure.
- Ignore: indicates that the counter towards the .backoffLimit is not
@@ -404,6 +411,60 @@ JobSpec 描述了任务执行的情况。
404
411
将退出码的检查限制为具有指定名称的容器。当为 null 时,该规则适用于所有容器。
405
412
当被指定时,它应与 Pod 模板中的容器名称或 initContainer 名称之一匹配。
406
413
414
+
<!--
415
+
### Alpha level
416
+
-->
417
+
### Alpha 级别 {#alpha-level}
418
+
419
+
<!--
420
+
- **backoffLimitPerIndex** (int32)
421
+
422
+
Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).
423
+
-->
424
+
-**backoffLimitPerIndex**(int32)
425
+
426
+
指定在将特定索引的 Pod 标记为失败之前在对该 Pod 重试次数的限制。
427
+
启用后,各索引的失败次数将保存在 Pod 的 `batch.kubernetes.io/job-index-failure-count` 注解中。
428
+
仅当 Job 的 completionMode=Indexed 且 Pod 的重启策略为 Never 时才能设置此字段。
Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).
podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods
450
+
when they are terminating (has a metadata.deletionTimestamp) or failed.
451
+
- Failed means to wait until a previously created Pod is fully terminated (has phase
452
+
Failed or Succeeded) before creating a replacement Pod.
453
+
-->
454
+
-**podReplacementPolicy**(string)
455
+
456
+
podReplacementPolicy 指定何时创建替代的 Pod。可能的值包括:
457
+
458
+
- TerminatingOrFailed:表示当 Pod 处于终止中(具有 metadata.deletionTimestamp)或失败时,重新创建 Pod。
459
+
- Failed:表示在创建替代的 Pod 之前,等待先前创建的 Pod 完全终止(处于 Failed 或 Succeeded 阶段)。
460
+
461
+
<!--
462
+
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 alpha field. Enable JobPodReplacementPolicy to be able to use this field.
FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).
0 commit comments