Skip to content

Commit

Permalink
feat: support custom containerd runtime path
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <[email protected]>
  • Loading branch information
zzzhangqi committed Nov 1, 2024
1 parent 43789cb commit 0178ed9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
14 changes: 1 addition & 13 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,10 @@ spec:
spec:
serviceAccountName: {{ .Values.serviceAccount.name }}
volumes:
{{- if .Values.useK3sContainerd }}
- hostPath:
path: /var/run/k3s/containerd
path: {{ .Values.Cluster.containerdRuntimePath }}
type: Directory
name: rundir
{{- else }}
- hostPath:
path: /run
type: Directory
name: rundir
{{- end }}
- hostPath:
path: /var
type: Directory
Expand Down Expand Up @@ -82,11 +75,6 @@ spec:
volumeMounts:
- mountPath: /var
name: vardir
{{- if .Values.useK3sContainerd }}
- mountPath: /run/containerd
name: rundir
{{- else }}
- mountPath: /run
name: rundir
{{- end }}
terminationGracePeriodSeconds: 10
4 changes: 1 addition & 3 deletions templates/rbdcomponent_helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,14 @@ items:
name: rbd-chaos
namespace: {{ .Release.Namespace }}
spec:
{{- if .Values.useK3sContainerd }}
volumeMounts:
- name: containerdsock
mountPath: /run/containerd
volumes:
- name: containerdsock
hostPath:
path: /var/run/k3s/containerd
path: {{ .Values.Cluster.containerdRuntimePath }}
type: Directory
{{- end }}
image: {{ .Values.Cluster.rainbondImageRepository }}/rbd-chaos:{{ .Values.Cluster.installVersion }}
imagePullPolicy: {{ .Values.Cluster.imagePullPolicy }}
replicas: {{ .Values.Cluster.replicas }}
Expand Down
5 changes: 2 additions & 3 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
serviceAccount:
name: rainbond-operator

# Use K3s Containerd
useK3sContainerd: false

# rainbondOperator
operator:
name: rainbond-operator
Expand Down Expand Up @@ -82,6 +79,8 @@ Cluster:
# Number of component copies
replicas: 1

# Define containerd runtime directory path, default: /run/containerd, if use k3s or RKE2, set to /var/run/k3s/containerd
containerdRuntimePath: /run/containerd


############################################
Expand Down

0 comments on commit 0178ed9

Please sign in to comment.