From 40621d4351a390ec826a8ebc6f9e13aeeb59e1dd Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 29 Jun 2022 14:39:12 +0530 Subject: [PATCH] Fix the test failure on volume snapshot Since we have upgraded to snapshot controller version to v6, the snapshot tests looks to be failing in the testgrid. It has been mainly because the latest version of snapshot controller stopped serving v1beta1 APIs. The sidecar image versions in the tests also has to be updated to make sure these are compatible. This commit add missing RBAC rules for the controller as per the latest version. Signed-off-by: Humble Chirammal --- .../rbac-volume-snapshot-controller.yaml | 9 ++++++--- .../volume-snapshot-controller-deployment.yaml | 2 +- .../storage-csi/gce-pd/controller_ss.yaml | 2 +- .../hostpath/hostpath/csi-hostpath-plugin.yaml | 4 ++-- .../storage-csi/mock/csi-mock-driver-snapshotter.yaml | 2 +- .../storage-csi/mock/csi-mock-driver.yaml | 2 +- .../storage-csi/mock/csi-mock-proxy.yaml | 2 +- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cluster/addons/volumesnapshots/volume-snapshot-controller/rbac-volume-snapshot-controller.yaml b/cluster/addons/volumesnapshots/volume-snapshot-controller/rbac-volume-snapshot-controller.yaml index d28df2eafef..d9c044eed6e 100644 --- a/cluster/addons/volumesnapshots/volume-snapshot-controller/rbac-volume-snapshot-controller.yaml +++ b/cluster/addons/volumesnapshots/volume-snapshot-controller/rbac-volume-snapshot-controller.yaml @@ -35,13 +35,16 @@ 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: ["volumesnapshots"] - verbs: ["get", "list", "watch", "update"] + verbs: ["get", "list", "watch", "update", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots/status"] - verbs: ["update"] + verbs: ["update", "patch"] + - apiGroups: ["snapshot.storage.k8s.io"] + resources: ["volumesnapshotcontents/status"] + verbs: ["patch"] - apiGroups: ["apiextensions.k8s.io"] resources: ["customresourcedefinitions"] verbs: ["create", "list", "watch", "delete", "get", "update"] diff --git a/cluster/addons/volumesnapshots/volume-snapshot-controller/volume-snapshot-controller-deployment.yaml b/cluster/addons/volumesnapshots/volume-snapshot-controller/volume-snapshot-controller-deployment.yaml index 25285886e7c..a0e8f8d337c 100644 --- a/cluster/addons/volumesnapshots/volume-snapshot-controller/volume-snapshot-controller-deployment.yaml +++ b/cluster/addons/volumesnapshots/volume-snapshot-controller/volume-snapshot-controller-deployment.yaml @@ -22,7 +22,7 @@ spec: serviceAccount: volume-snapshot-controller containers: - name: volume-snapshot-controller - image: registry.k8s.io/sig-storage/snapshot-controller:v4.2.1 + image: registry.k8s.io/sig-storage/snapshot-controller:v6.0.1 args: - "--v=5" - "--metrics-path=/metrics" diff --git a/test/e2e/testing-manifests/storage-csi/gce-pd/controller_ss.yaml b/test/e2e/testing-manifests/storage-csi/gce-pd/controller_ss.yaml index a34c8d112ae..07c377010e4 100644 --- a/test/e2e/testing-manifests/storage-csi/gce-pd/controller_ss.yaml +++ b/test/e2e/testing-manifests/storage-csi/gce-pd/controller_ss.yaml @@ -39,7 +39,7 @@ spec: - name: socket-dir mountPath: /csi - name: csi-provisioner - image: registry.k8s.io/sig-storage/csi-provisioner:v3.1.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v3.2.1 args: - "--v=5" - "--csi-address=/csi/csi.sock" 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 dd5af9e6dad..f78afc026c3 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 @@ -323,7 +323,7 @@ spec: name: socket-dir - name: csi-provisioner - image: registry.k8s.io/sig-storage/csi-provisioner:v3.1.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v3.2.1 args: - -v=5 - --csi-address=/csi/csi.sock @@ -352,7 +352,7 @@ spec: name: socket-dir - name: csi-snapshotter - image: registry.k8s.io/sig-storage/csi-snapshotter:v5.0.1 + image: registry.k8s.io/sig-storage/csi-snapshotter:v6.0.1 args: - -v=5 - --csi-address=/csi/csi.sock 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 7d01689a5b9..94cc2849953 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: registry.k8s.io/sig-storage/csi-snapshotter:v4.2.1 + image: registry.k8s.io/sig-storage/csi-snapshotter:v6.0.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 248001ca970..a8ad2fa905b 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: registry.k8s.io/sig-storage/csi-provisioner:v3.0.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v3.2.1 args: - "--csi-address=$(ADDRESS)" # Topology support is needed for the pod rescheduling test 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 c00196db986..4c07514728f 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: registry.k8s.io/sig-storage/csi-provisioner:v3.0.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v3.2.1 args: - "--csi-address=$(ADDRESS)" # Topology support is needed for the pod rescheduling test