@@ -36,10 +36,8 @@ CronJob 代表单个定时作业(Cron Job) 的配置。
36
36
37
37
- ** apiVersion** : batch/v1
38
38
39
-
40
39
- ** kind** : CronJob
41
40
42
-
43
41
- ** metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a >)
44
42
45
43
<!--
@@ -117,18 +115,25 @@ CronJobSpec 描述了作业的执行方式和实际将运行的时间。
117
115
118
116
- ** schedule** (string), 必需
119
117
120
- Cron 格式的排期表,请参阅 https://en .wikipedia.org/wiki/Cron .
118
+ Cron 格式的排期表,请参阅 https://zh .wikipedia.org/wiki/Cron。
121
119
122
120
<!--
123
121
- **timeZone** (string)
124
122
125
- The time zone for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will rely on the time zone of the kube-controller-manager process. ALPHA: This field is in alpha and must be enabled via the `CronJobTimeZone` feature gate.
123
+ The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will default to the time zone of the kube-controller-manager process. The set of valid time zone names and the time zone offset is loaded from the system-wide time zone database by the API server during CronJob validation and the controller manager during execution. If no system-wide time zone database can be found a bundled version of the database is used instead. If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host configuration, the controller will stop creating new new Jobs and will create a system event with the reason UnknownTimeZone. More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones This is beta field and must be enabled via the `CronJobTimeZone` feature gate.
126
124
-->
127
125
128
126
- ** timeZone** (string)
129
127
130
- 给定时间表的时区,请参阅 https://en.wikipedia.org/wiki/List_of_tz_database_time_zones。
131
- 如果未指定,这将取决于 kube-controller-manager 进程的时区。 ALPHA:此字段处于 alpha 状态,必须通过 "CronJobTimeZone" 功能门启用。
128
+ 给定时间表的时区名称,请参阅 https://en.wikipedia.org/wiki/List_of_tz_database_time_zones。
129
+ 如果未指定,这将默认为 kube-controller-manager 进程的时区。
130
+ 有效时区名称和时区偏移量的设置由 API 服务器在 CronJob 验证期间从系统范围的时区数据库进行加载,
131
+ 在执行期间由控制器管理器从系统范围的时区数据库进行加载。
132
+ 如果找不到系统范围的时区数据库,则转而使用该数据库的捆绑版本。
133
+ 如果时区名称在 CronJob 的生命周期内或由于主机配置更改而变得无效,该控制器将停止创建新的 Job,
134
+ 并将创建一个原因为 UnknownTimeZone 的系统事件。更多信息,请请参阅
135
+ https://kubernetes.io/zh-cn/docs/concepts/workloads/controllers/cron-jobs/#time-zones。
136
+ 这是 Beta 字段,必须通过 ` CronJobTimeZone ` 特性门控启用。
132
137
133
138
<!--
134
139
- **concurrencyPolicy** (string)
@@ -138,11 +143,11 @@ CronJobSpec 描述了作业的执行方式和实际将运行的时间。
138
143
139
144
- ** concurrencyPolicy** (string)
140
145
141
- 指定如何处理作业的并发执行。 有效值为:
146
+ 指定如何处理作业的并发执行。 有效值为:
142
147
143
- - "Allow" (默认):允许 CronJobs 并发运行;
144
- - "Forbid":禁止并发运行,如果上一次运行尚未完成则跳过下一次运行;
145
- - "Replace":取消当前正在运行的作业并将其替换为新作业
148
+ - "Allow" (默认):允许 CronJobs 并发运行;
149
+ - "Forbid":禁止并发运行,如果上一次运行尚未完成则跳过下一次运行;
150
+ - "Replace":取消当前正在运行的作业并将其替换为新作业。
146
151
147
152
<!--
148
153
- **startingDeadlineSeconds** (int64)
@@ -184,7 +189,6 @@ CronJobSpec 描述了作业的执行方式和实际将运行的时间。
184
189
185
190
要保留的以失败状态结束的作业个数。值必须是非负整数。默认值为 1。
186
191
187
-
188
192
## CronJobStatus {#CronJobStatus}
189
193
190
194
<!--
@@ -240,7 +244,6 @@ CronJobStatus 表示某个定时作业的当前状态。
240
244
<a name =" Time " ></a >
241
245
** Time 是对 time.Time 的封装,它支持对 YAML 和 JSON 的正确编排。为 time 包提供的许多工厂方法模式提供了包装器。**
242
246
243
-
244
247
## CronJobList {#CronJobList}
245
248
246
249
<!--
@@ -254,7 +257,6 @@ CronJobList 是定时作业的集合。
254
257
255
258
- ** apiVersion** : batch/v1
256
259
257
-
258
260
- ** kind** : CronJobList
259
261
260
262
<!--
@@ -273,13 +275,12 @@ CronJobList 是定时作业的集合。
273
275
-->
274
276
- ** items** ([ ] <a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >), required
275
277
276
- items 是 CronJobs 的列表。
277
-
278
+ items 是 CronJob 的列表。
278
279
279
280
<!--
280
281
## Operations {#Operations}
281
282
-->
282
- ## 操作 {#操作 }
283
+ ## 操作 {#Operations }
283
284
284
285
<hr >
285
286
@@ -292,7 +293,6 @@ GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
292
293
293
294
#### Parameters
294
295
-->
295
-
296
296
### ` get ` 查看指定的 CronJob
297
297
298
298
#### HTTP 请求
@@ -306,12 +306,10 @@ GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
306
306
307
307
name of the CronJob
308
308
309
-
310
309
- **namespace** (*in path*): string, required
311
310
312
311
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
313
312
314
-
315
313
- **pretty** (*in query*): string
316
314
317
315
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
@@ -325,23 +323,20 @@ GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
325
323
326
324
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
327
325
328
-
329
326
- ** pretty** (** 查询参数** ): string
330
327
331
328
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
332
329
333
330
<!--
334
331
#### Response
335
332
-->
336
-
337
333
#### 响应
338
334
339
335
<!--
340
336
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): OK
341
337
342
338
401: Unauthorized
343
339
-->
344
-
345
340
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): OK
346
341
347
342
401: Unauthorized
@@ -354,7 +349,6 @@ GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
354
349
GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status
355
350
356
351
#### Parameters
357
-
358
352
-->
359
353
360
354
### ` get ` 查看指定 CronJob 的状态
@@ -370,12 +364,10 @@ GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status
370
364
371
365
name of the CronJob
372
366
373
-
374
367
- **namespace** (*in path*): string, required
375
368
376
369
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
377
370
378
-
379
371
- **pretty** (*in query*): string
380
372
381
373
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
@@ -385,28 +377,24 @@ GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status
385
377
386
378
CronJob 的名称
387
379
388
-
389
380
- ** namespace** (** 路径参数** ): string, 必需
390
381
391
382
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
392
383
393
-
394
384
- ** pretty** (** 查询参数** ): string
395
385
396
386
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
397
387
398
388
<!--
399
389
#### Response
400
390
401
-
402
391
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): OK
403
392
404
393
401: Unauthorized
405
394
-->
406
395
407
396
#### 响应
408
397
409
-
410
398
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): OK
411
399
412
400
401: Unauthorized
@@ -420,7 +408,6 @@ GET /apis/batch/v1/namespaces/{namespace}/cronjobs
420
408
421
409
#### Parameters
422
410
-->
423
-
424
411
### ` list ` 查看或监视 CronJob 类别的对象
425
412
426
413
#### HTTP 请求
@@ -549,7 +536,6 @@ GET /apis/batch/v1/namespaces/{namespace}/cronjobs
549
536
550
537
#### 响应
551
538
552
-
553
539
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJobList" >}}">CronJobList</a >): OK
554
540
555
541
401: Unauthorized
@@ -563,7 +549,6 @@ GET /apis/batch/v1/cronjobs
563
549
564
550
#### Parameters
565
551
-->
566
-
567
552
### ` list ` 查看或监视 CronJob 类型的对象
568
553
569
554
#### HTTP 请求
@@ -675,15 +660,13 @@ GET /apis/batch/v1/cronjobs
675
660
<!--
676
661
#### Response
677
662
678
-
679
663
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJobList" >}}">CronJobList</a>): OK
680
664
681
665
401: Unauthorized
682
666
-->
683
667
684
668
#### 响应
685
669
686
-
687
670
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJobList" >}}">CronJobList</a >): OK
688
671
689
672
401: Unauthorized
@@ -706,7 +689,6 @@ POST /apis/batch/v1/namespaces/{namespace}/cronjobs
706
689
707
690
#### 参数
708
691
709
-
710
692
<!--
711
693
- **namespace** (*in path*): string, required
712
694
@@ -766,7 +748,6 @@ POST /apis/batch/v1/namespaces/{namespace}/cronjobs
766
748
<!--
767
749
#### Response
768
750
769
-
770
751
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): OK
771
752
772
753
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): Created
@@ -778,7 +759,6 @@ POST /apis/batch/v1/namespaces/{namespace}/cronjobs
778
759
779
760
#### 响应
780
761
781
-
782
762
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): OK
783
763
784
764
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): Created
@@ -873,7 +853,6 @@ PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
873
853
<!--
874
854
#### Response
875
855
876
-
877
856
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): OK
878
857
879
858
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): Created
@@ -883,7 +862,6 @@ PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
883
862
884
863
#### 响应
885
864
886
-
887
865
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): OK
888
866
889
867
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): Created
@@ -977,7 +955,6 @@ PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status
977
955
<!--
978
956
#### Response
979
957
980
-
981
958
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): OK
982
959
983
960
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): Created
@@ -987,7 +964,6 @@ PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status
987
964
988
965
#### 响应
989
966
990
-
991
967
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): OK
992
968
993
969
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): Created
@@ -1016,7 +992,6 @@ PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
1016
992
- **name** (*in path*): string, required
1017
993
1018
994
name of the CronJob
1019
- -
1020
995
-->
1021
996
1022
997
- ** name** (** 路径参数** ): string, 必需
@@ -1092,7 +1067,6 @@ PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
1092
1067
<!--
1093
1068
#### Response
1094
1069
1095
-
1096
1070
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): OK
1097
1071
1098
1072
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): Created
@@ -1102,7 +1076,6 @@ PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
1102
1076
1103
1077
#### 响应
1104
1078
1105
-
1106
1079
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): OK
1107
1080
1108
1081
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): Created
@@ -1206,7 +1179,6 @@ PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status
1206
1179
<!--
1207
1180
#### Response
1208
1181
1209
-
1210
1182
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): OK
1211
1183
1212
1184
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a>): Created
@@ -1216,7 +1188,6 @@ PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status
1216
1188
1217
1189
#### 响应
1218
1190
1219
-
1220
1191
200 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): OK
1221
1192
1222
1193
201 (<a href="{{< ref "../workload-resources/cron-job-v1#CronJob" >}}">CronJob</a >): Created
@@ -1310,7 +1281,6 @@ DELETE /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
1310
1281
<!--
1311
1282
#### Response
1312
1283
1313
-
1314
1284
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): OK
1315
1285
1316
1286
202 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): Accepted
@@ -1320,7 +1290,6 @@ DELETE /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
1320
1290
1321
1291
#### 响应
1322
1292
1323
-
1324
1293
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a >): OK
1325
1294
1326
1295
202 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a >): Accepted
@@ -1474,15 +1443,13 @@ DELETE /apis/batch/v1/namespaces/{namespace}/cronjobs
1474
1443
<!--
1475
1444
#### Response
1476
1445
1477
-
1478
1446
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): OK
1479
1447
1480
1448
401: Unauthorized
1481
1449
-->
1482
1450
1483
1451
#### 响应
1484
1452
1485
-
1486
1453
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a >): OK
1487
1454
1488
1455
401: Unauthorized
0 commit comments