Skip to content

Commit

Permalink
KubeletDir value implementation (#36)
Browse files Browse the repository at this point in the history
implement kubeletDir value who allows overriding the host location of kubelet's internal state
  • Loading branch information
tuxtof authored Aug 12, 2021
1 parent 3691413 commit fd30429
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/nutanix-csi-storage/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: nutanix-csi-storage
version: 2.3.12
version: 2.3.13
kubeVersion: ">= 1.17.0-0"
description: A Helm chart for installing Nutanix CSI Volume Driver
home: https://github.com/nutanix/helm
Expand Down
1 change: 1 addition & 0 deletions charts/nutanix-csi-storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ The following table lists the configurable parameters of the Nutanix-CSI chart a
| `fileHost` | NFS server IP address | `10.0.0.3`|
| `filePath` | Path of the NFS share |`share`|
| `fileServerName` | Name of the Nutanix FIle Server | `file`|
| `kubeletDir` | allows overriding the host location of kubelet's internal state | `/var/lib/kubelet`|
| `nodeSelector` | Add nodeSelector to all pods | `{}` |
| `tolerations` | Add tolerations to all pods | `[]` |
| `imagePullPolicy` | Specify imagePullPolicy for all pods| `IfNotPresent`|
Expand Down
10 changes: 5 additions & 5 deletions charts/nutanix-csi-storage/templates/ntnx-csi-node-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/{{ include "nutanix-csi-storage.drivername" . }}/csi.sock
value: {{ .Values.kubeletDir }}/plugins/{{ include "nutanix-csi-storage.drivername" . }}/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
Expand Down Expand Up @@ -66,7 +66,7 @@ spec:
- name: plugin-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: /var/lib/kubelet
mountPath: {{ .Values.kubeletDir }}
# needed so that any mounts setup inside this container are
# propagated back to the host machine.
mountPropagation: "Bidirectional"
Expand Down Expand Up @@ -107,15 +107,15 @@ spec:
volumes:
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/
path: {{ .Values.kubeletDir }}/plugins_registry/
type: Directory
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/{{ include "nutanix-csi-storage.drivername" . }}/
path: {{ .Values.kubeletDir }}/plugins/{{ include "nutanix-csi-storage.drivername" . }}/
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet
path: {{ .Values.kubeletDir }}
type: Directory
- name: device-dir
hostPath:
Expand Down
3 changes: 3 additions & 0 deletions charts/nutanix-csi-storage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ legacy: false
# Starting v2.3.1 CSI driver is OS independent, this value is reserved
os: none

# kubeletDir allows overriding the host location of kubelet's internal state.
kubeletDir: "/var/lib/kubelet"

# Global Settings for all pods

nodeSelector: {}
Expand Down

0 comments on commit fd30429

Please sign in to comment.