Skip to content

Commit

Permalink
nydus-snapshotter: remove config related to nydus after uninstalling
Browse files Browse the repository at this point in the history
Remove config related to nydus after uninstalling nydus snapshotter.

Fixes dragonflyoss#206

Signed-off-by: ChengyuZhu6 <[email protected]>
  • Loading branch information
ChengyuZhu6 committed Dec 14, 2023
1 parent 73f3d70 commit 761a48e
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,26 @@ spec:
- name: update-containerd
image: "{{ .Values.containerRuntime.initContainerImage }}"
imagePullPolicy: {{ .Values.pullPolicy | quote }}
resources:
{{ toYaml .Values.resources | indent 12 }}
resources: {{ toYaml .Values.resources | indent 12 }}
lifecycle:
preStop:
exec:
command:
- "/bin/sh"
- "-c"
- |
# Recover the containerd config file.
etcContainerd={{ .Values.containerRuntime.containerd.configFile }}
rm -f ${etcContainerd}
mv ${etcContainerd}.bak ${etcContainerd}
# currently, without host pid in container, we can not nsenter with pid and can not invoke systemctl correctly.
nsenter -t 1 -m systemctl -- restart containerd.service
command:
- /bin/sh
- -cx
- |-
etcContainerd={{ .Values.containerRuntime.containerd.configFile }}
cp ${etcContainerd} ${etcContainerd}.bak
toml check $etcContainerd proxy_plugins.nydus
if [ $? -eq 0 ]; then
Expand Down

0 comments on commit 761a48e

Please sign in to comment.