From e3965ba8cc4d8a1ec3029856234a73b57fb33cc7 Mon Sep 17 00:00:00 2001 From: Zane van Iperen Date: Mon, 2 Aug 2021 21:51:50 +1000 Subject: [PATCH] [cinder-csi-plugin] Allow overridng kubelet dir in chart values The chart assumes Kubelet uses /var/lib/kubelet, which isn't the case on k0s and microk8s (and presumably others). This allows it to be overridden in the values file to handle these cases. Also bump chart version to 1.4.7 --- charts/cinder-csi-plugin/Chart.yaml | 2 +- .../templates/nodeplugin-daemonset.yaml | 10 +++++----- charts/cinder-csi-plugin/values.yaml | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/charts/cinder-csi-plugin/Chart.yaml b/charts/cinder-csi-plugin/Chart.yaml index 9a7da5f359..c2cf38c8af 100644 --- a/charts/cinder-csi-plugin/Chart.yaml +++ b/charts/cinder-csi-plugin/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: latest description: Cinder CSI Chart for OpenStack name: openstack-cinder-csi -version: 1.4.6 +version: 1.4.7 home: https://github.com/kubernetes/cloud-provider-openstack icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png maintainers: diff --git a/charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml b/charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml index 2845239847..7aeede24da 100644 --- a/charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml +++ b/charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml @@ -30,7 +30,7 @@ spec: - name: ADDRESS value: /csi/csi.sock - name: DRIVER_REG_SOCK_PATH - value: /var/lib/kubelet/plugins/cinder.csi.openstack.org/csi.sock + value: {{ .Values.csi.nodePlugin.kubeletDir }}/plugins/cinder.csi.openstack.org/csi.sock - name: KUBE_NODE_NAME valueFrom: fieldRef: @@ -84,7 +84,7 @@ spec: - name: socket-dir mountPath: /csi - name: kubelet-dir - mountPath: /var/lib/kubelet + mountPath: {{ .Values.csi.nodePlugin.kubeletDir }} mountPropagation: "Bidirectional" - name: pods-probe-dir mountPath: /dev @@ -94,15 +94,15 @@ spec: volumes: - name: socket-dir hostPath: - path: /var/lib/kubelet/plugins/cinder.csi.openstack.org + path: {{ .Values.csi.nodePlugin.kubeletDir }}/plugins/cinder.csi.openstack.org type: DirectoryOrCreate - name: registration-dir hostPath: - path: /var/lib/kubelet/plugins_registry/ + path: {{ .Values.csi.nodePlugin.kubeletDir }}/plugins_registry/ type: Directory - name: kubelet-dir hostPath: - path: /var/lib/kubelet + path: {{ .Values.csi.nodePlugin.kubeletDir }} type: Directory # - name: pods-cloud-data # hostPath: diff --git a/charts/cinder-csi-plugin/values.yaml b/charts/cinder-csi-plugin/values.yaml index ed97819d65..26ad2b5184 100644 --- a/charts/cinder-csi-plugin/values.yaml +++ b/charts/cinder-csi-plugin/values.yaml @@ -65,6 +65,7 @@ csi: nodeSelector: {} tolerations: - operator: Exists + kubeletDir: /var/lib/kubelet controllerPlugin: affinity: {} nodeSelector: {}