diff --git a/charts/aws-efs-csi-driver/templates/node-daemonset.yaml b/charts/aws-efs-csi-driver/templates/node-daemonset.yaml index 4fa44b9cd..d1baa42e2 100644 --- a/charts/aws-efs-csi-driver/templates/node-daemonset.yaml +++ b/charts/aws-efs-csi-driver/templates/node-daemonset.yaml @@ -96,7 +96,7 @@ spec: {{- end }} volumeMounts: - name: kubelet-dir - mountPath: /var/lib/kubelet + mountPath: {{ .Values.node.kubeletPath }} mountPropagation: "Bidirectional" - name: plugin-dir mountPath: /csi @@ -135,7 +135,7 @@ spec: - name: ADDRESS value: /csi/csi.sock - name: DRIVER_REG_SOCK_PATH - value: /var/lib/kubelet/plugins/efs.csi.aws.com/csi.sock + value: {{ printf "%s/plugins/efs.csi.aws.com/csi.sock" (trimSuffix "/" .Values.node.kubeletPath) }} - name: KUBE_NODE_NAME valueFrom: fieldRef: @@ -172,15 +172,15 @@ spec: volumes: - name: kubelet-dir hostPath: - path: /var/lib/kubelet + path: {{ .Values.node.kubeletPath }} type: Directory - name: plugin-dir hostPath: - path: /var/lib/kubelet/plugins/efs.csi.aws.com/ + path: {{ printf "%s/plugins/efs.csi.aws.com/" (trimSuffix "/" .Values.node.kubeletPath) }} type: DirectoryOrCreate - name: registration-dir hostPath: - path: /var/lib/kubelet/plugins_registry/ + path: {{ printf "%s/plugins_registry/" (trimSuffix "/" .Values.node.kubeletPath) }} type: Directory - name: efs-state-dir hostPath: @@ -196,4 +196,4 @@ spec: type: DirectoryOrCreate {{- with .Values.node.volumes }} {{- toYaml . | nindent 8 }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/charts/aws-efs-csi-driver/values.yaml b/charts/aws-efs-csi-driver/values.yaml index a9e549fb8..22689f08e 100644 --- a/charts/aws-efs-csi-driver/values.yaml +++ b/charts/aws-efs-csi-driver/values.yaml @@ -187,6 +187,7 @@ node: env: [] volumes: [] volumeMounts: [] + kubeletPath: /var/lib/kubelet storageClasses: [] # Add StorageClass resources like: