We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df73b95 commit 803b49cCopy full SHA for 803b49c
content/bn/examples/application/job/indexed-job.yaml
@@ -0,0 +1,35 @@
1
+apiVersion: batch/v1
2
+kind: Job
3
+metadata:
4
+ name: 'indexed-job'
5
+spec:
6
+ completions: 5
7
+ parallelism: 3
8
+ completionMode: Indexed
9
+ template:
10
+ spec:
11
+ restartPolicy: Never
12
+ initContainers:
13
+ - name: 'input'
14
+ image: 'docker.io/library/bash'
15
+ command:
16
+ - "bash"
17
+ - "-c"
18
+ - |
19
+ items=(foo bar baz qux xyz)
20
+ echo ${items[$JOB_COMPLETION_INDEX]} > /input/data.txt
21
+ volumeMounts:
22
+ - mountPath: /input
23
+ name: input
24
+ containers:
25
+ - name: 'worker'
26
+ image: 'docker.io/library/busybox'
27
28
+ - "rev"
29
+ - "/input/data.txt"
30
31
32
33
+ volumes:
34
+ - name: input
35
+ emptyDir: {}
0 commit comments