diff --git a/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml index 445ec0dfe..78fb6cbac 100644 --- a/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml +++ b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml @@ -65,6 +65,7 @@ spec: imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} args: - "--nodeid=$(NODE_ID)" + - "--pluginpath={{ .Values.kubeletDir }}/plugins" - "--type=rbd" - "--nodeserver=true" - "--pidlimit=-1" diff --git a/cmd/cephcsi.go b/cmd/cephcsi.go index eae798cfc..b22c17ecb 100644 --- a/cmd/cephcsi.go +++ b/cmd/cephcsi.go @@ -48,6 +48,8 @@ const ( // use default namespace if namespace is not set. defaultNS = "default" + + defaultPluginPath = "/var/lib/kubelet/plugins" ) var conf util.Config @@ -59,6 +61,7 @@ func init() { flag.StringVar(&conf.DriverName, "drivername", "", "name of the driver") flag.StringVar(&conf.DriverNamespace, "drivernamespace", defaultNS, "namespace in which driver is deployed") flag.StringVar(&conf.NodeID, "nodeid", "", "node id") + flag.StringVar(&conf.PluginPath, "pluginpath", defaultPluginPath, "plugin path") flag.StringVar(&conf.InstanceID, "instanceid", "", "Unique ID distinguishing this instance of Ceph CSI among other"+ " instances, when sharing Ceph clusters across CSI instances for provisioning") flag.IntVar(&conf.PidLimit, "pidlimit", 0, "the PID limit to configure through cgroups") diff --git a/deploy/rbd/kubernetes/csi-rbdplugin.yaml b/deploy/rbd/kubernetes/csi-rbdplugin.yaml index 03166a11b..a5d3f8b38 100644 --- a/deploy/rbd/kubernetes/csi-rbdplugin.yaml +++ b/deploy/rbd/kubernetes/csi-rbdplugin.yaml @@ -51,6 +51,7 @@ spec: image: quay.io/cephcsi/cephcsi:canary args: - "--nodeid=$(NODE_ID)" + - "--pluginpath=/var/lib/kubelet/plugins" - "--type=rbd" - "--nodeserver=true" - "--endpoint=$(CSI_ENDPOINT)"