Skip to content

Commit 015e9a4

Browse files
committed
[zh] Sync controllers/cron-jobs.md
1 parent e1ca4c8 commit 015e9a4

File tree

1 file changed

+25
-9
lines changed
  • content/zh-cn/docs/concepts/workloads/controllers

1 file changed

+25
-9
lines changed

content/zh-cn/docs/concepts/workloads/controllers/cron-jobs.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: CronJob
3+
api_metadata:
4+
- apiVersion: "batch/v1"
5+
kind: "CronJob"
36
content_type: concept
47
description: >-
58
CronJob 通过重复调度启动一次性的 Job。
@@ -12,6 +15,9 @@ reviewers:
1215
- soltysh
1316
- janetkuo
1417
title: CronJob
18+
api_metadata:
19+
- apiVersion: "batch/v1"
20+
kind: "CronJob"
1521
content_type: concept
1622
description: >-
1723
A CronJob starts one-time Jobs on a repeating schedule.
@@ -310,18 +316,28 @@ When `.spec.suspend` changes from `true` to `false` on an existing CronJob witho
310316
<!--
311317
### Jobs history limits
312318
313-
The `.spec.successfulJobsHistoryLimit` and `.spec.failedJobsHistoryLimit` fields are optional.
314-
These fields specify how many completed and failed Jobs should be kept.
315-
By default, they are set to 3 and 1 respectively. Setting a limit to `0` corresponds to keeping
316-
none of the corresponding kind of Jobs after they finish.
319+
The `.spec.successfulJobsHistoryLimit` and `.spec.failedJobsHistoryLimit` fields specify
320+
how many completed and failed Jobs should be kept. Both fields are optional.
317321
318-
For another way to clean up Jobs automatically, see [Clean up finished Jobs automatically](/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically).
322+
* `.spec.successfulJobsHistoryLimit`: This field specifies the number of successful finished
323+
jobs to keep. The default value is `3`. Setting this field to `0` will not keep any successful jobs.
324+
325+
* `.spec.failedJobsHistoryLimit`: This field specifies the number of failed finished jobs to keep.
326+
The default value is `1`. Setting this field to `0` will not keep any failed jobs.
327+
328+
For another way to clean up Jobs automatically, see
329+
[Clean up finished Jobs automatically](/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically).
319330
-->
320331
### 任务历史限制 {#jobs-history-limits}
321332

322-
`.spec.successfulJobsHistoryLimit``.spec.failedJobsHistoryLimit` 字段是可选的。
323-
这两个字段指定应保留多少已完成和失败的 Job。
324-
默认设置分别为 3 和 1。将限制设置为 `0` 代表相应类型的 Job 完成后不会保留。
333+
`.spec.successfulJobsHistoryLimit``.spec.failedJobsHistoryLimit`
334+
字段指定应保留多少已完成和失败的 Job。这两个字段都是可选的。
335+
336+
* `.spec.successfulJobsHistoryLimit`:此字段指定要保留多少成功完成的 Job。默认值为 `3`
337+
将此字段设置为 `0` 意味着不会保留任何成功的 Job。
338+
339+
* `.spec.failedJobsHistoryLimit`:此字段指定要保留多少失败完成的 Job。默认值为 `1`
340+
将此字段设置为 `0` 意味着不会保留任何失败的 Job。
325341

326342
有关自动清理 Job 的其他方式,
327343
请参见[自动清理完成的 Job](/zh-cn/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically)
@@ -362,7 +378,7 @@ Go 标准库中的时区数据库包含在二进制文件中,并用作备用
362378
363379
### Unsupported TimeZone specification
364380
-->
365-
## CronJob 的限制 {#cronjob-limitations}
381+
## CronJob 的限制 {#cron-job-limitations}
366382

367383
### 不支持的时区规范 {#unsupported-timezone-spec}
368384

0 commit comments

Comments
 (0)