diff --git a/test/e2e/storage/drivers/csi.go b/test/e2e/storage/drivers/csi.go index c387c7e55e164..10af124fc4c33 100644 --- a/test/e2e/storage/drivers/csi.go +++ b/test/e2e/storage/drivers/csi.go @@ -618,10 +618,10 @@ func (m *mockCSIDriver) PrepareTest(f *framework.Framework) (*storageframework.P } else { // When using the mock driver inside the cluster it has to be reconfigured // via command line parameters. - containerArgs = append(containerArgs, "--name=csi-mock-"+f.UniqueName) + containerArgs = append(containerArgs, "--drivername=csi-mock-"+f.UniqueName) - if !m.attachable { - containerArgs = append(containerArgs, "--disable-attach") + if m.attachable { + containerArgs = append(containerArgs, "--enable-attach") } if m.enableTopology { diff --git a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml index 5410634f16273..0f9d2ef006ebc 100644 --- a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml +++ b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml @@ -53,10 +53,13 @@ spec: - mountPath: /registration name: registration-dir - name: mock - image: k8s.gcr.io/sig-storage/mock-driver:v4.1.0 + image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3 args: - - "--name=mock.storage.k8s.io" - - "-v=3" # enabled the gRPC call logging + - "--drivername=mock.storage.k8s.io" + - "--nodeid=$(KUBE_NODE_NAME)" + - "--endpoint=/csi/csi.sock" + - "--statedir=/tmp/csi-hotpath-data" + - "-v=5" # enabled the gRPC call logging env: - name: CSI_ENDPOINT value: /csi/csi.sock @@ -74,6 +77,8 @@ spec: name: kubelet-pods-dir - mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi name: kubelet-csi-dir + - mountPath: /dev + name: dev-dir volumes: - hostPath: path: /var/lib/kubelet/plugins/csi-mock @@ -93,3 +98,7 @@ spec: path: /var/lib/kubelet/plugins_registry type: Directory name: registration-dir + - hostPath: + path: /dev + type: Directory + name: dev-dir diff --git a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml index 84dbf4f19e588..adf9bf45e81fb 100644 --- a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml +++ b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml @@ -53,16 +53,20 @@ spec: - mountPath: /registration name: registration-dir - name: mock - image: k8s.gcr.io/sig-storage/mock-driver:v4.1.0 + image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3 args: - # -v3 shows when connections get established. Higher log levels print information about - # transferred bytes, but cannot print message content (no gRPC parsing), so this is usually - # not interesting. - - -v=3 + - -v=5 + - -nodeid=$(KUBE_NODE_NAME) + - -endpoint=/csi/csi.sock - -proxy-endpoint=tcp://:9000 env: - name: CSI_ENDPOINT value: /csi/csi.sock + - name: KUBE_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName ports: - containerPort: 9000 name: socat