Skip to content

Commit

Permalink
fix: nydus-snapshotter can not run cause of failing of postStart hook (
Browse files Browse the repository at this point in the history
…#209)

Fix nydus-snapshotter can not run cause of failing of postStart hook when containerd config is disabled

Signed-off-by: soup <[email protected]>
  • Loading branch information
cheriL authored Dec 11, 2023
1 parent ce4e751 commit 2f6d13f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/nydus-snapshotter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: nydus-snapshotter
description: Nydus snapshotter is an external plugin of containerd for Nydus image service which implements a chunk-based content-addressable filesystem on top of a called RAFS.
icon: https://github.com/dragonflyoss/image-service/raw/master/misc/logo.svg
type: application
version: 0.0.6
version: 0.0.7
appVersion: 0.9.0
keywords:
- nydus
Expand Down
1 change: 1 addition & 0 deletions charts/nydus-snapshotter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ helm delete nydus-snapshotter --namespace nydus-snapshotter
| dragonfly.mirrorConfig[0].ping_url | string | `"http://127.0.0.1:40901/server/ping"` | |
| hostAliases | list | `[]` | Host Aliases |
| hostNetwork | bool | `true` | Let nydus-snapshotter run in host network |
| hostPid | bool | `true` | Let nydus-snapshotter use the host's pid namespace |
| image | string | `"ghcr.io/containerd/nydus-snapshotter"` | Image repository |
| name | string | `"nydus-snapshotter"` | nydus-snapshotter name |
| nodeSelector | object | `{}` | Node labels for pod assignment |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
hostNetwork: {{ .Values.hostNetwork }}
hostPID: {{ .Values.containerRuntime.containerd.enable }}
hostPID: {{ .Values.hostPid }}
{{- if .Values.hostNetwork }}
dnsPolicy: "ClusterFirstWithHostNet"
{{- end }}
Expand Down Expand Up @@ -66,6 +66,7 @@ spec:
value: "false"
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.containerRuntime.containerd.enable }}
lifecycle:
postStart:
exec:
Expand All @@ -75,6 +76,7 @@ spec:
- |
# 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
{{- end }}
{{- if .Values.args }}
args:
{{ toYaml .Values.args | indent 12 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/nydus-snapshotter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ tag: v0.9.0
pullPolicy: Always
# -- Let nydus-snapshotter run in host network
hostNetwork: true
# -- Let nydus-snapshotter use the host's pid namespace
hostPid: true
# -- Host Aliases
hostAliases: []
# -- Args to overwrite default nydus-snapshotter startup command
Expand Down

0 comments on commit 2f6d13f

Please sign in to comment.