Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: fix csi plugin loop mount bug (#3287) #3290

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion charts/fluid/fluid/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,7 @@

### 0.9.0
* Support pass image pull secrets from fluid charts to alluxioruntime controller
* Fix components rbacs and set Fluid CSI Plugin with node-authorized kube-client
* Fix components rbacs and set Fluid CSI Plugin with node-authorized kube-client

### 0.9.1
* Fix CSI Plugin loop mount bug
17 changes: 12 additions & 5 deletions charts/fluid/fluid/templates/csi/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,30 @@ spec:
mountPropagation: "Bidirectional"
- name: kubelet-kube-config
mountPath: /etc/kubernetes/kubelet.conf
mountPropagation: "HostToContainer"
readOnly: true
# Check subdirectory to avoid looping bind mounts
{{- $kubeletRootDir := ternary ( .Values.csi.kubelet.rootDir ) ( print .Values.csi.kubelet.rootDir "/" ) ( hasSuffix "/" .Values.csi.kubelet.rootDir ) }}
{{- if not ( hasPrefix $kubeletRootDir .Values.csi.kubelet.certDir ) }}
- name: kubelet-cert-dir
mountPath: {{ .Values.csi.kubelet.certDir | quote }}
readOnly: true
{{- end }}
- name: updatedb-conf
mountPath: /host-etc/updatedb.conf
- name: updatedb-conf-bak
mountPath: /host-etc/updatedb.conf.bak
volumes:
- name: kubelet-dir
hostPath:
path: {{ .Values.csi.kubelet.rootDir }}
path: {{ .Values.csi.kubelet.rootDir | quote }}
type: Directory
{{- if not ( hasPrefix $kubeletRootDir .Values.csi.kubelet.certDir ) }}
- name: kubelet-cert-dir
hostPath:
path: {{ .Values.csi.kubelet.certDir | quote }}
type: Directory
{{- end }}
- name: plugin-dir
hostPath:
path: {{ .Values.csi.kubelet.rootDir }}/plugins/csi-fluid-plugin
Expand All @@ -135,10 +146,6 @@ spec:
path: {{ .Values.csi.kubelet.kubeConfigFile | quote }}
type: File
name: kubelet-kube-config
- hostPath:
path: {{ .Values.csi.kubelet.certDir | quote }}
type: Directory
name: kubelet-cert-dir
- hostPath:
path: /etc/updatedb.conf
type: FileOrCreate
Expand Down
Loading