From d4befa79db3ea7dd120d7aeca8d33090a0388313 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Fri, 23 Aug 2019 14:04:27 +0530 Subject: [PATCH] update plugin directory name in csi This is required if you are running multiple csi drivers, if multiple node plugins are listening on the same socket they request may go to any node plugin. to avoid this we need to have a unique socket per csi driver. It is recommended to have socket inside the driver name folder. Signed-off-by: Madhu Rajanna --- .../cephfs/csi-cephfsplugin-provisioner.yaml | 2 +- .../ceph/csi/template/cephfs/csi-cephfsplugin.yaml | 4 ++-- .../csi/template/rbd/csi-rbdplugin-provisioner.yaml | 2 +- .../ceph/csi/template/rbd/csi-rbdplugin.yaml | 4 ++-- tests/framework/installer/ceph_csi_templates.go | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner.yaml b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner.yaml index 74f8529de..f8d4dcf30 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner.yaml @@ -105,7 +105,7 @@ spec: volumes: - name: socket-dir hostPath: - path: /var/lib/kubelet/plugins/cephfs.csi.ceph.com + path: /var/lib/kubelet/plugins/{{ .DriverNamePrefix }}cephfs.csi.ceph.com type: DirectoryOrCreate - name: host-sys hostPath: diff --git a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin.yaml b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin.yaml index f6bfe0176..838a1bc95 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin.yaml @@ -23,7 +23,7 @@ spec: args: - "--v=5" - "--csi-address=/csi/csi.sock" - - "--kubelet-registration-path=/var/lib/kubelet/plugins/cephfs.csi.ceph.com/csi.sock" + - "--kubelet-registration-path=/var/lib/kubelet/plugins/{{ .DriverNamePrefix }}cephfs.csi.ceph.com/csi.sock" lifecycle: preStop: exec: @@ -110,7 +110,7 @@ spec: volumes: - name: plugin-dir hostPath: - path: /var/lib/kubelet/plugins/cephfs.csi.ceph.com/ + path: /var/lib/kubelet/plugins/{{ .DriverNamePrefix }}cephfs.csi.ceph.com/ type: DirectoryOrCreate - name: csi-plugins-dir hostPath: diff --git a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner.yaml b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner.yaml index 882bf3b82..6009fd6a1 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner.yaml @@ -136,7 +136,7 @@ spec: path: /lib/modules - name: socket-dir hostPath: - path: /var/lib/kubelet/plugins/rbd.csi.ceph.com + path: /var/lib/kubelet/plugins/{{ .DriverNamePrefix }}rbd.csi.ceph.com type: DirectoryOrCreate - name: ceph-csi-config configMap: diff --git a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin.yaml b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin.yaml index cdbd4c10a..20c9aa2d4 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin.yaml @@ -25,7 +25,7 @@ spec: args: - "--v=5" - "--csi-address=/csi/csi.sock" - - "--kubelet-registration-path=/var/lib/kubelet/plugins/rbd.csi.ceph.com/csi.sock" + - "--kubelet-registration-path=/var/lib/kubelet/plugins/{{ .DriverNamePrefix }}rbd.csi.ceph.com/csi.sock" lifecycle: preStop: exec: @@ -113,7 +113,7 @@ spec: volumes: - name: plugin-dir hostPath: - path: /var/lib/kubelet/plugins/rbd.csi.ceph.com + path: /var/lib/kubelet/plugins/{{ .DriverNamePrefix }}rbd.csi.ceph.com type: DirectoryOrCreate - name: plugin-mount-dir hostPath: diff --git a/tests/framework/installer/ceph_csi_templates.go b/tests/framework/installer/ceph_csi_templates.go index ca4dfb9e9..a294d5724 100644 --- a/tests/framework/installer/ceph_csi_templates.go +++ b/tests/framework/installer/ceph_csi_templates.go @@ -158,7 +158,7 @@ const ( path: /lib/modules - name: socket-dir hostPath: - path: /var/lib/kubelet/plugins/rbd.csi.ceph.com + path: /var/lib/kubelet/plugins/{{ .DriverNamePrefix }}rbd.csi.ceph.com type: DirectoryOrCreate - name: ceph-csi-config configMap: @@ -198,7 +198,7 @@ const ( args: - "--v=5" - "--csi-address=/csi/csi.sock" - - "--kubelet-registration-path=/var/lib/kubelet/plugins/rbd.csi.ceph.com/csi.sock" + - "--kubelet-registration-path=/var/lib/kubelet/plugins/{{ .DriverNamePrefix }}rbd.csi.ceph.com/csi.sock" lifecycle: preStop: exec: @@ -287,7 +287,7 @@ const ( volumes: - name: plugin-dir hostPath: - path: /var/lib/kubelet/plugins/rbd.csi.ceph.com + path: /var/lib/kubelet/plugins/{{ .DriverNamePrefix }}rbd.csi.ceph.com type: DirectoryOrCreate - name: plugin-mount-dir hostPath: @@ -432,7 +432,7 @@ const ( volumes: - name: socket-dir hostPath: - path: /var/lib/kubelet/plugins/cephfs.csi.ceph.com + path: /var/lib/kubelet/plugins/{{ .DriverNamePrefix }}cephfs.csi.ceph.com type: DirectoryOrCreate - name: host-sys hostPath: @@ -480,7 +480,7 @@ const ( args: - "--v=5" - "--csi-address=/csi/csi.sock" - - "--kubelet-registration-path=/var/lib/kubelet/plugins/cephfs.csi.ceph.com/csi.sock" + - "--kubelet-registration-path=/var/lib/kubelet/plugins/{{ .DriverNamePrefix }}cephfs.csi.ceph.com/csi.sock" lifecycle: preStop: exec: @@ -567,7 +567,7 @@ const ( volumes: - name: plugin-dir hostPath: - path: /var/lib/kubelet/plugins/cephfs.csi.ceph.com/ + path: /var/lib/kubelet/plugins/{{ .DriverNamePrefix }}cephfs.csi.ceph.com/ type: DirectoryOrCreate - name: csi-plugins-dir hostPath: