File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
charts/nydus-snapshotter/templates/nydus-snapshotter Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,26 @@ spec:
101
101
- name : update-containerd
102
102
image : " {{ .Values.containerRuntime.initContainerImage }}"
103
103
imagePullPolicy : {{ .Values.pullPolicy | quote }}
104
- resources :
105
- {{ toYaml .Values.resources | indent 12 }}
104
+ resources : {{ toYaml .Values.resources | indent 12 }}
105
+ lifecycle :
106
+ preStop :
107
+ exec :
108
+ command :
109
+ - " /bin/sh"
110
+ - " -c"
111
+ - |
112
+ # Recover the containerd config file.
113
+ etcContainerd={{ .Values.containerRuntime.containerd.configFile }}
114
+ rm -f ${etcContainerd}
115
+ mv ${etcContainerd}.bak ${etcContainerd}
116
+ # currently, without host pid in container, we can not nsenter with pid and can not invoke systemctl correctly.
117
+ nsenter -t 1 -m systemctl -- restart containerd.service
106
118
command :
107
119
- /bin/sh
108
120
- -cx
109
121
- |-
110
122
etcContainerd={{ .Values.containerRuntime.containerd.configFile }}
123
+ cp ${etcContainerd} ${etcContainerd}.bak
111
124
112
125
toml check $etcContainerd proxy_plugins.nydus
113
126
if [ $? -eq 0 ]; then
You can’t perform that action at this time.
0 commit comments