-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathset-image-pull-progress-timeout.yaml
More file actions
62 lines (62 loc) · 1.69 KB
/
set-image-pull-progress-timeout.yaml
File metadata and controls
62 lines (62 loc) · 1.69 KB
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
53
54
55
56
57
58
59
60
61
62
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
component: set-image-pull-progress-timeout
name: set-image-pull-progress-timeout
namespace: kube-system
spec:
selector:
matchLabels:
component: set-image-pull-progress-timeout
tier: node
template:
metadata:
labels:
component: set-image-pull-progress-timeout
tier: node
spec:
containers:
- command:
- nsenter
- --target
- "1"
- --mount
- --uts
- --ipc
- --net
- --pid
- --
- sh
- -c
- |
containerdConfigPath="/etc/containerd/config.toml"
echo "`date` before change containerd config:"
cat ${containerdConfigPath}
if !(( grep image_pull_progress_timeout ${containerdConfigPath} ))
then
sed -i '/sandbox_image.*/a \ \ image_pull_progress_timeout = "5m0s"' ${containerdConfigPath}
echo "`date` after changing containerd config:"
cat ${containerdConfigPath}
systemctl daemon-reload
systemctl restart containerd
fi
sleep 600000000s
image: alpine
imagePullPolicy: IfNotPresent
name: set-image-pull-progress-timeout
resources:
requests:
cpu: 10m
securityContext:
privileged: true
hostPID: true
nodeSelector:
kubernetes.io/os: linux
tolerations:
- effect: NoSchedule
operator: Exists
restartPolicy: Always
updateStrategy:
type: OnDelete