Skip to content

Commit ace7510

Browse files
committed
[job] feat: add job and cronjob code.
1 parent 53c2909 commit ace7510

1 file changed

Lines changed: 44 additions & 1 deletion

File tree

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,49 @@ spec:
13151315

13161316
Secret 的使用方法和前面教程中 ConfigMap 基本一致,这里就不再过多赘述。
13171317

1318+
## Job
1319+
1320+
```yaml
1321+
apiVersion: batch/v1
1322+
kind: Job
1323+
metadata:
1324+
name: echo-job
1325+
spec:
1326+
parallelism: 3
1327+
completions: 5
1328+
template:
1329+
spec:
1330+
restartPolicy: OnFailure
1331+
containers:
1332+
- name: echo
1333+
image: busybox
1334+
command: ["echo", "Running in a job"]
1335+
```
1336+
1337+
TODO
1338+
1339+
## CronJob
1340+
1341+
```yaml
1342+
apiVersion: batch/v1
1343+
kind: CronJob
1344+
metadata:
1345+
name: echo-cronjob
1346+
spec:
1347+
schedule: "* * * * *" # Every minute
1348+
jobTemplate:
1349+
spec:
1350+
template:
1351+
spec:
1352+
restartPolicy: OnFailure
1353+
containers:
1354+
- name: echo
1355+
image: busybox
1356+
command: ["echo", "Triggered by a CronJob"]
1357+
```
1358+
1359+
TODO
1360+
13181361
## helm
13191362

13201363
```shell
@@ -1327,5 +1370,5 @@ helm list
13271370
helm rollback hello-helm
13281371
```
13291372

1330-
1373+
TODO
13311374

0 commit comments

Comments
 (0)