-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinit-container-test-0.yaml
52 lines (51 loc) · 1.05 KB
/
init-container-test-0.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Kubelet runs the Pod's init containers in the order they appear in the Pod's spec.
apiVersion: v1
kind: Pod
metadata:
name: order
spec:
volumes:
- name: test-vol
emptyDir: {}
containers:
- image: busybox:1.28
name: main-container
command:
- sh
- -c
- echo -n "Testing to check sequential order and timing of Init-containers" > /tmp/main.log && \
date >> /tmp/main.log; sleep 4500;
volumeMounts:
- name: test-vol
mountPath: /tmp/
initContainers:
- image: alpine
name: alpha-1
command:
- sh
- -c
args:
- date > /tmp/alpha-1.log;sleep 5;
volumeMounts:
- name: test-vol
mountPath: /tmp/
- image: busybox:1.28
name: alpha-2
command:
- sh
- -c
args:
- date > /tmp/alpha-2.log;sleep 5;
volumeMounts:
- name: test-vol
mountPath: /tmp/
- image: busybox:1.28
name: alpha-3
command:
- sh
- -c
args:
- date > /tmp/alpha-3.log; sleep 5;
volumeMounts:
- name: test-vol
mountPath: /tmp/