diff --git a/test/e2e/storage/drivers/csi.go b/test/e2e/storage/drivers/csi.go index c387c7e55e1..10af124fc4c 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/external-attacher/rbac.yaml b/test/e2e/testing-manifests/storage-csi/external-attacher/rbac.yaml index 0d84f62d50e..e2d6676dfda 100644 --- a/test/e2e/testing-manifests/storage-csi/external-attacher/rbac.yaml +++ b/test/e2e/testing-manifests/storage-csi/external-attacher/rbac.yaml @@ -1,6 +1,6 @@ -# Do not edit, downloaded from https://github.com/kubernetes-csi/external-attacher/raw/v3.2.1/deploy/kubernetes//rbac.yaml -# for csi-driver-host-path v1.7.2 -# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh +# Do not edit, downloaded from https://github.com/kubernetes-csi/external-attacher/raw/v3.3.0/deploy/kubernetes//rbac.yaml +# for csi-driver-host-path v1.7.3 +# by ./update-hostpath.sh # # This YAML file contains all RBAC objects that are necessary to run external # CSI attacher. diff --git a/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-agent/rbac.yaml b/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-agent/rbac.yaml deleted file mode 100644 index f847393f5f3..00000000000 --- a/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-agent/rbac.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.2.0/deploy/kubernetes/external-health-monitor-agent/rbac.yaml -# for csi-driver-host-path v1.7.2 -# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh -# -# This YAML file contains all RBAC objects that are necessary to run external -# CSI health monitor agent. -# -# In production, each CSI driver deployment has to be customized: -# - to avoid conflicts, use non-default namespace and different names -# for non-namespaced entities like the ClusterRole -# - decide whether the deployment replicates the external CSI -# health monitor agent, in which case leadership election must be enabled; -# this influences the RBAC setup, see below - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: csi-external-health-monitor-agent - # replace with non-default namespace name - namespace: default - ---- -# Health monitor agent must be able to work with PVs, PVCs, Nodes and Pods -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: external-health-monitor-agent-runner -rules: - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["get", "list", "watch", "create", "patch"] - ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: csi-external-health-monitor-agent-role -subjects: - - kind: ServiceAccount - name: csi-external-health-monitor-agent - # replace with non-default namespace name - namespace: default -roleRef: - kind: ClusterRole - name: external-health-monitor-agent-runner - apiGroup: rbac.authorization.k8s.io - - diff --git a/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml b/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml index 387caa59358..b7f150d2752 100644 --- a/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml +++ b/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml @@ -1,6 +1,6 @@ -# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.3.0/deploy/kubernetes/external-health-monitor-controller/rbac.yaml -# for csi-driver-host-path v1.7.2 -# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh +# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.4.0/deploy/kubernetes/external-health-monitor-controller/rbac.yaml +# for csi-driver-host-path v1.7.3 +# by ./update-hostpath.sh # # This YAML file contains all RBAC objects that are necessary to run external # CSI health monitor controller. diff --git a/test/e2e/testing-manifests/storage-csi/external-provisioner/rbac.yaml b/test/e2e/testing-manifests/storage-csi/external-provisioner/rbac.yaml index ab151a65468..e2ce0be5fb4 100644 --- a/test/e2e/testing-manifests/storage-csi/external-provisioner/rbac.yaml +++ b/test/e2e/testing-manifests/storage-csi/external-provisioner/rbac.yaml @@ -1,6 +1,6 @@ -# Do not edit, downloaded from https://github.com/kubernetes-csi/external-provisioner/raw/v2.2.1/deploy/kubernetes//rbac.yaml -# for csi-driver-host-path v1.7.2 -# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh +# Do not edit, downloaded from https://github.com/kubernetes-csi/external-provisioner/raw/v3.0.0/deploy/kubernetes//rbac.yaml +# for csi-driver-host-path v1.7.3 +# by ./update-hostpath.sh # # This YAML file contains all RBAC objects that are necessary to run external # CSI provisioner. diff --git a/test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml b/test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml index b071ceeb091..15b73670e1f 100644 --- a/test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml +++ b/test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml @@ -1,6 +1,6 @@ -# Do not edit, downloaded from https://github.com/kubernetes-csi/external-resizer/raw/v1.2.0/deploy/kubernetes//rbac.yaml -# for csi-driver-host-path v1.7.2 -# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh +# Do not edit, downloaded from https://github.com/kubernetes-csi/external-resizer/raw/v1.3.0/deploy/kubernetes//rbac.yaml +# for csi-driver-host-path v1.7.3 +# by ./update-hostpath.sh # # This YAML file contains all RBAC objects that are necessary to run external # CSI resizer. diff --git a/test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml b/test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml index fe9b86ac874..7843e80b098 100644 --- a/test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml +++ b/test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml @@ -1,6 +1,6 @@ -# Do not edit, downloaded from https://github.com/kubernetes-csi/external-snapshotter/raw/v4.1.1/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml -# for csi-driver-host-path v1.7.2 -# by test/e2e/testing-manifests/storage-csi/update-hostpath.sh +# Do not edit, downloaded from https://github.com/kubernetes-csi/external-snapshotter/raw/v5.0.0-rc1/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml +# for csi-driver-host-path master +# by ./update-hostpath.sh # # Together with the RBAC file for external-provisioner, this YAML file # contains all RBAC objects that are necessary to run external CSI @@ -39,10 +39,10 @@ rules: verbs: ["get", "list", "watch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents"] - verbs: ["create", "get", "list", "watch", "update", "delete"] + verbs: ["create", "get", "list", "watch", "update", "delete", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents/status"] - verbs: ["update"] + verbs: ["update", "patch"] --- kind: ClusterRoleBinding diff --git a/test/e2e/testing-manifests/storage-csi/hostpath/README.md b/test/e2e/testing-manifests/storage-csi/hostpath/README.md index 621f0a96391..15aca4f6df9 100644 --- a/test/e2e/testing-manifests/storage-csi/hostpath/README.md +++ b/test/e2e/testing-manifests/storage-csi/hostpath/README.md @@ -1,4 +1,4 @@ The files in this directory are exact copys of "kubernetes-latest" in -https://github.com/kubernetes-csi/csi-driver-host-path/tree/v1.7.2/deploy/ +https://github.com/kubernetes-csi/csi-driver-host-path/tree/v1.7.3/deploy/ -Do not edit manually. Run test/e2e/testing-manifests/storage-csi/update-hostpath.sh to refresh the content. +Do not edit manually. Run ./update-hostpath.sh to refresh the content. diff --git a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml index 53cd47488dc..8ccc2d36ee0 100644 --- a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml +++ b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml @@ -218,7 +218,7 @@ spec: serviceAccountName: csi-hostpathplugin-sa containers: - name: hostpath - image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.1 + image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3 args: - "--drivername=hostpath.csi.k8s.io" - "--v=5" @@ -260,24 +260,8 @@ spec: - mountPath: /dev name: dev-dir - - name: csi-external-health-monitor-agent - image: k8s.gcr.io/sig-storage/csi-external-health-monitor-agent:v0.2.0 - args: - - "--v=5" - - "--csi-address=$(ADDRESS)" - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: ADDRESS - value: /csi/csi.sock - imagePullPolicy: "IfNotPresent" - volumeMounts: - - name: socket-dir - mountPath: /csi - name: csi-external-health-monitor-controller - image: k8s.gcr.io/sig-storage/csi-external-health-monitor-controller:v0.3.0 + image: k8s.gcr.io/sig-storage/csi-external-health-monitor-controller:v0.4.0 args: - "--v=5" - "--csi-address=$(ADDRESS)" @@ -291,7 +275,7 @@ spec: mountPath: /csi - name: node-driver-registrar - image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.2.0 + image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0 args: - --v=5 - --csi-address=/csi/csi.sock @@ -325,7 +309,7 @@ spec: - --health-port=9898 - name: csi-attacher - image: k8s.gcr.io/sig-storage/csi-attacher:v3.2.1 + image: k8s.gcr.io/sig-storage/csi-attacher:v3.3.0 args: - --v=5 - --csi-address=/csi/csi.sock @@ -339,7 +323,7 @@ spec: name: socket-dir - name: csi-provisioner - image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.1 + image: k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0 args: - -v=5 - --csi-address=/csi/csi.sock @@ -354,7 +338,7 @@ spec: name: socket-dir - name: csi-resizer - image: k8s.gcr.io/sig-storage/csi-resizer:v1.2.0 + image: k8s.gcr.io/sig-storage/csi-resizer:v1.3.0 args: - -v=5 - -csi-address=/csi/csi.sock @@ -368,7 +352,7 @@ spec: name: socket-dir - name: csi-snapshotter - image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.1.1 + image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1 args: - -v=5 - --csi-address=/csi/csi.sock diff --git a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-attacher.yaml b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-attacher.yaml index c87c137158a..57f8226da7a 100644 --- a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-attacher.yaml +++ b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-attacher.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: csi-mock containers: - name: csi-attacher - image: k8s.gcr.io/sig-storage/csi-attacher:v3.2.0 + image: k8s.gcr.io/sig-storage/csi-attacher:v3.3.0 args: - --v=5 - --csi-address=$(ADDRESS) diff --git a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-resizer.yaml b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-resizer.yaml index 682089ec7df..4573884e36d 100644 --- a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-resizer.yaml +++ b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-resizer.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: csi-mock containers: - name: csi-resizer - image: k8s.gcr.io/sig-storage/csi-resizer:v1.1.0 + image: k8s.gcr.io/sig-storage/csi-resizer:v1.3.0 args: - "--v=5" - "--csi-address=$(ADDRESS)" diff --git a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-snapshotter.yaml b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-snapshotter.yaml index fb42c0d1ad5..6d5db053429 100644 --- a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-snapshotter.yaml +++ b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-snapshotter.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: csi-mock containers: - name: csi-snapshotter - image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.0.0 + image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1 args: - "--v=5" - "--csi-address=$(ADDRESS)" 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 5410634f162..7424b3b656a 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 @@ -15,7 +15,7 @@ spec: serviceAccountName: csi-mock containers: - name: csi-provisioner - image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.0 + image: k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0 args: - "--csi-address=$(ADDRESS)" # Topology support is needed for the pod rescheduling test @@ -34,7 +34,7 @@ spec: - mountPath: /csi name: socket-dir - name: driver-registrar - image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0 + image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0 args: - --v=5 - --csi-address=/csi/csi.sock @@ -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 84dbf4f19e5..8d93f08db58 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 @@ -15,7 +15,7 @@ spec: serviceAccountName: csi-mock containers: - name: csi-provisioner - image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.0 + image: k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0 args: - "--csi-address=$(ADDRESS)" # Topology support is needed for the pod rescheduling test @@ -35,7 +35,7 @@ spec: - mountPath: /csi name: socket-dir - name: driver-registrar - image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0 + image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0 args: - --v=5 - --csi-address=/csi/csi.sock @@ -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 diff --git a/test/e2e/testing-manifests/storage-csi/update-hostpath.sh b/test/e2e/testing-manifests/storage-csi/update-hostpath.sh index 415b2cbcdaa..af94b9b7025 100755 --- a/test/e2e/testing-manifests/storage-csi/update-hostpath.sh +++ b/test/e2e/testing-manifests/storage-csi/update-hostpath.sh @@ -132,3 +132,10 @@ for image in $images; do esac download "$project" "$path" "$tag" "$rbac" done + +# Update the mock driver manifests, too. +grep -r image: hostpath/hostpath/csi-hostpath-plugin.yaml | while read -r image; do + version=$(echo "$image" | sed -e 's/.*:\(.*\)/\1/') + image=$(echo "$image" | sed -e 's/.*image: \([^:]*\).*/\1/') + sed -i -e "s;$image:.*;$image:$version;" mock/*.yaml +done