Skip to content

Commit

Permalink
add mount config for docker and podman volume (#346)
Browse files Browse the repository at this point in the history
Signed-off-by: cormick <[email protected]>
  • Loading branch information
CormickKneey authored Jan 7, 2025
1 parent a4811ea commit df98c72
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/dragonfly/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: dragonfly
description: Dragonfly is an intelligent P2P based image and file distribution system
icon: https://raw.githubusercontent.com/dragonflyoss/dragonfly/main/docs/images/logo/dragonfly.svg
type: application
version: 1.3.0
version: 1.3.1
appVersion: 2.2.0
keywords:
- dragonfly
Expand Down
26 changes: 26 additions & 0 deletions charts/dragonfly/templates/client/client-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ spec:
- name: crio-config-dir
mountPath: {{ dir .Values.client.dfinit.config.containerRuntime.crio.configPath }}
{{- end }}
{{- if and (.Values.client.dfinit.enable) (.Values.client.dfinit.config.containerRuntime.podman) }}
- name: podman-config-dir
mountPath: {{ dir .Values.client.dfinit.config.containerRuntime.podman.configPath }}
{{- end }}
{{- if and (.Values.client.dfinit.enable) (.Values.client.dfinit.config.containerRuntime.docker) }}
- name: docker-config-dir
mountPath: {{ dir .Values.client.dfinit.config.containerRuntime.docker.configPath }}
{{- end }}
{{- end }}
{{- if .Values.client.dfinit.enable }}
- name: restart-container-runtime
Expand All @@ -118,6 +126,12 @@ spec:
{{- else if .Values.client.dfinit.config.containerRuntime.crio }}
nsenter -t 1 -m -- systemctl restart crio.service
echo "restart cri-o"
{{- else if .Values.client.dfinit.config.containerRuntime.podman }}
nsenter -t 1 -m -- systemctl restart podman.service
echo "restart podman"
{{- else if .Values.client.dfinit.config.containerRuntime.docker }}
nsenter -t 1 -m -- systemctl restart docker.service
echo "restart docker"
{{- else }}
echo "no container runtime to restart"
{{- end }}
Expand Down Expand Up @@ -188,6 +202,18 @@ spec:
path: {{ dir .Values.client.dfinit.config.containerRuntime.crio.configPath }}
type: DirectoryOrCreate
{{- end }}
{{- if and (.Values.client.dfinit.enable) (.Values.client.dfinit.config.containerRuntime.podman) }}
- name: podman-config-dir
hostPath:
path: {{ dir .Values.client.dfinit.config.containerRuntime.podman.configPath }}
type: DirectoryOrCreate
{{- end }}
{{- if and (.Values.client.dfinit.enable) (.Values.client.dfinit.config.containerRuntime.docker) }}
- name: docker-config-dir
hostPath:
path: {{ dir .Values.client.dfinit.config.containerRuntime.docker.configPath }}
type: DirectoryOrCreate
{{- end }}
{{- if .Values.client.extraVolumes }}
{{- toYaml .Values.client.extraVolumes | nindent 6 }}
{{- end }}
Expand Down

0 comments on commit df98c72

Please sign in to comment.