Skip to content

Commit

Permalink
Mount kubelet.conf with HostToContainer mount propagation, To #501793…
Browse files Browse the repository at this point in the history
…95 (#3318)

Signed-off-by: cheyang <[email protected]>
Co-authored-by: TzZtzt <[email protected]>
  • Loading branch information
cheyang and TrafalgarZZZ authored Jul 10, 2023
1 parent 3cabcf1 commit 937441d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions charts/fluid/fluid/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@
### 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 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

0 comments on commit 937441d

Please sign in to comment.