Skip to content

Commit d633f25

Browse files
committed
feat: add kubeletDir in chart config
1 parent f9e5ae6 commit d633f25

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

charts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The following table lists the configurable parameters of the latest NFS CSI Driv
4040
| `driver.mountPermissions` | mounted folder permissions name | `0777`
4141
| `feature.enableFSGroupPolicy` | enable `fsGroupPolicy` on a k8s 1.20+ cluster | `true` |
4242
| `feature.enableInlineVolume` | enable inline volume | `false` |
43+
| `kubeletDir` | alternative kubelet directory | `/var/lib/kubelet` |
4344
| `image.nfs.repository` | csi-driver-nfs image | `mcr.microsoft.com/k8s/csi/nfs-csi` |
4445
| `image.nfs.tag` | csi-driver-nfs image tag | `latest` |
4546
| `image.nfs.pullPolicy` | csi-driver-nfs image pull policy | `IfNotPresent` |
16 Bytes
Binary file not shown.

charts/latest/csi-driver-nfs/templates/csi-nfs-controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ spec:
9595
periodSeconds: 30
9696
volumeMounts:
9797
- name: pods-mount-dir
98-
mountPath: /var/lib/kubelet/pods
98+
mountPath: {{ .Values.kubeletDir }}/pods
9999
mountPropagation: "Bidirectional"
100100
- mountPath: /csi
101101
name: socket-dir
102102
resources: {{- toYaml .Values.controller.resources.nfs | nindent 12 }}
103103
volumes:
104104
- name: pods-mount-dir
105105
hostPath:
106-
path: /var/lib/kubelet/pods
106+
path: {{ .Values.kubeletDir }}/pods
107107
type: Directory
108108
- name: socket-dir
109109
emptyDir: {}

charts/latest/csi-driver-nfs/templates/csi-nfs-node.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ spec:
6060
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
6161
env:
6262
- name: DRIVER_REG_SOCK_PATH
63-
value: /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
63+
value: {{ .Values.kubeletDir }}/plugins/csi-nfsplugin/csi.sock
6464
- name: KUBE_NODE_NAME
6565
valueFrom:
6666
fieldRef:
@@ -109,19 +109,19 @@ spec:
109109
- name: socket-dir
110110
mountPath: /csi
111111
- name: pods-mount-dir
112-
mountPath: /var/lib/kubelet/pods
112+
mountPath: {{ .Values.kubeletDir }}/pods
113113
mountPropagation: "Bidirectional"
114114
resources: {{- toYaml .Values.node.resources.nfs | nindent 12 }}
115115
volumes:
116116
- name: socket-dir
117117
hostPath:
118-
path: /var/lib/kubelet/plugins/csi-nfsplugin
118+
path: {{ .Values.kubeletDir }}/plugins/csi-nfsplugin
119119
type: DirectoryOrCreate
120120
- name: pods-mount-dir
121121
hostPath:
122-
path: /var/lib/kubelet/pods
122+
path: {{ .Values.kubeletDir }}/pods
123123
type: Directory
124124
- hostPath:
125-
path: /var/lib/kubelet/plugins_registry
125+
path: {{ .Values.kubeletDir }}/plugins_registry
126126
type: Directory
127127
name: registration-dir

charts/latest/csi-driver-nfs/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ feature:
3232
enableFSGroupPolicy: true
3333
enableInlineVolume: false
3434

35+
kubeletDir: /var/lib/kubelet
36+
3537
controller:
3638
name: csi-nfs-controller
3739
replicas: 2

0 commit comments

Comments
 (0)