Skip to content

Commit b221c21

Browse files
authored
Merge pull request #2259 from hajiler/kubelet-directory-mount
Replace kubelet volume mount with subdirectories
2 parents 6b43659 + 200a34c commit b221c21

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

deploy/kubernetes/base/node_linux/node.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ spec:
5656
fieldRef:
5757
fieldPath: spec.nodeName
5858
volumeMounts:
59-
- name: kubelet-dir
60-
mountPath: /var/lib/kubelet
59+
- name: kubelet-plugin-dir
60+
mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
61+
mountPropagation: "Bidirectional"
62+
- name: kubelet-pods
63+
mountPath: /var/lib/kubelet/pods
6164
mountPropagation: "Bidirectional"
6265
- name: plugin-dir
6366
mountPath: /csi
@@ -81,10 +84,13 @@ spec:
8184
hostPath:
8285
path: /var/lib/kubelet/plugins_registry/
8386
type: Directory
84-
- name: kubelet-dir
87+
- name: kubelet-pods
8588
hostPath:
86-
path: /var/lib/kubelet
87-
type: Directory
89+
path: /var/lib/kubelet/pods
90+
- name: kubelet-plugin-dir
91+
hostPath:
92+
path: /var/lib/kubelet/plugins/kubernetes.io/csi
93+
type: DirectoryOrCreate
8894
- name: plugin-dir
8995
hostPath:
9096
path: /var/lib/kubelet/plugins/pd.csi.storage.gke.io/

deploy/kubernetes/base/node_windows/node.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ spec:
5050
command:
5151
- /gce-pd-csi-driver
5252
volumeMounts:
53-
- name: kubelet-dir
54-
mountPath: C:\var\lib\kubelet
53+
- name: kubelet-plugin-dir
54+
mountPath: C:\var\lib\kubelet\plugins\kubernetes.io\csi
55+
mountPropagation: "None"
56+
- name: kubelet-pods
57+
mountPath: C:\var\lib\kubelet\pods
5558
mountPropagation: "None"
5659
- name: plugin-dir
5760
mountPath: C:\csi
@@ -100,10 +103,13 @@ spec:
100103
hostPath:
101104
path: \var\lib\kubelet\plugins_registry
102105
type: Directory
103-
- name: kubelet-dir
106+
- name: kubelet-pods
104107
hostPath:
105-
path: \var\lib\kubelet
106-
type: Directory
108+
path: \var\lib\kubelet\pods
109+
- name: kubelet-plugin-dir
110+
hostPath:
111+
path: \var\lib\kubelet\plugins\kubernetes.io\csi
112+
type: DirectoryOrCreate
107113
- name: plugin-dir
108114
hostPath:
109115
path: \var\lib\kubelet\plugins\pd.csi.storage.gke.io

0 commit comments

Comments
 (0)