Skip to content

Commit 6465f33

Browse files
authored
Merge pull request #120 from sdrik/non-standard-kubelet-root-dir
Add support for non-standard kubelet root directory
2 parents ad88d44 + 82d4805 commit 6465f33

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

deploy/charts/csi-driver/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ A Helm chart for cert-manager-csi-driver
2424
| app.driver.csiDataDir | string | `"/tmp/cert-manager-csi-driver"` | Configures the hostPath directory that the driver will write and mount volumes from. |
2525
| app.driver.name | string | `"csi.cert-manager.io"` | Name of the driver which will be registered with Kubernetes. |
2626
| app.driver.useTokenRequest | bool | `false` | If enabled, will use CSI token request for creating CertificateRequests. CertificateRequests will be created via mounting pod's service accounts. |
27+
| app.kubeletRootDir | string | `"/var/lib/kubelet"` | Overrides path to root kubelet directory in case of a non-standard k8s install. |
2728
| app.livenessProbe | object | `{"port":9809}` | Options for the liveness container. |
2829
| app.livenessProbe.port | int | `9809` | The port that will expose the livness of the csi-driver |
2930
| app.logLevel | int | `1` | Verbosity of cert-manager-csi-driver logging. |

deploy/charts/csi-driver/templates/daemonset.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
args:
2727
- -v={{ .Values.app.logLevel }}
2828
- --csi-address=/plugin/csi.sock
29-
- --kubelet-registration-path=/var/lib/kubelet/plugins/cert-manager-csi-driver/csi.sock
29+
- --kubelet-registration-path={{ .Values.app.kubeletRootDir }}/plugins/cert-manager-csi-driver/csi.sock
3030
env:
3131
- name: KUBE_NODE_NAME
3232
valueFrom:
@@ -76,7 +76,7 @@ spec:
7676
- name: plugin-dir
7777
mountPath: /plugin
7878
- name: pods-mount-dir
79-
mountPath: /var/lib/kubelet/pods
79+
mountPath: {{ .Values.app.kubeletRootDir }}/pods
8080
mountPropagation: "Bidirectional"
8181
- name: csi-data-dir
8282
mountPath: /csi-data-dir
@@ -103,14 +103,14 @@ spec:
103103
volumes:
104104
- name: plugin-dir
105105
hostPath:
106-
path: /var/lib/kubelet/plugins/cert-manager-csi-driver
106+
path: {{ .Values.app.kubeletRootDir }}/plugins/cert-manager-csi-driver
107107
type: DirectoryOrCreate
108108
- name: pods-mount-dir
109109
hostPath:
110-
path: /var/lib/kubelet/pods
110+
path: {{ .Values.app.kubeletRootDir }}/pods
111111
type: Directory
112112
- hostPath:
113-
path: /var/lib/kubelet/plugins_registry
113+
path: {{ .Values.app.kubeletRootDir }}/plugins_registry
114114
type: Directory
115115
name: registration-dir
116116
- hostPath:

deploy/charts/csi-driver/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ app:
4343
livenessProbe:
4444
# -- The port that will expose the livness of the csi-driver
4545
port: 9809
46+
# -- Overrides path to root kubelet directory in case of a non-standard k8s install.
47+
kubeletRootDir: /var/lib/kubelet
4648

4749
resources: {}
4850
# -- Kubernetes pod resource limits for cert-manager-csi-driver

0 commit comments

Comments
 (0)