From 503f654d7a6b84c6885c53ac528dfaab37f5c281 Mon Sep 17 00:00:00 2001 From: saad-ali Date: Wed, 14 Nov 2018 21:07:54 -0800 Subject: [PATCH] Update CSI tests to point to 1.0.0 external bits. --- test/e2e/storage/drivers/csi.go | 4 +-- test/e2e/storage/testsuites/volumemode.go | 2 +- .../storage-csi/driver-registrar/rbac.yaml | 4 +-- .../storage-csi/gce-pd/controller_ss.yaml | 29 ++++++++--------- .../gce-pd/csi-controller-rbac.yaml | 14 ++++---- .../storage-csi/gce-pd/node_ds.yaml | 32 +++++++++---------- .../hostpath/csi-hostpath-attacher.yaml | 2 +- .../hostpath/csi-hostpath-provisioner.yaml | 2 +- .../hostpath/hostpath/csi-hostpathplugin.yaml | 6 ++-- .../hostpath/hostpath/e2e-test-rbac.yaml | 2 +- 10 files changed, 47 insertions(+), 50 deletions(-) diff --git a/test/e2e/storage/drivers/csi.go b/test/e2e/storage/drivers/csi.go index 605962cf64c..e6153e62cee 100644 --- a/test/e2e/storage/drivers/csi.go +++ b/test/e2e/storage/drivers/csi.go @@ -147,7 +147,7 @@ var _ DynamicPVTestDriver = &gcePDCSIDriver{} func InitGcePDCSIDriver() TestDriver { return &gcePDCSIDriver{ driverInfo: DriverInfo{ - Name: "com.google.csi.gcepd", + Name: "pd.csi.storage.gke.io", FeatureTag: "[Serial]", MaxFileSize: testpatterns.FileSizeMedium, SupportedFsType: sets.NewString( @@ -237,7 +237,7 @@ var _ DynamicPVTestDriver = &gcePDExternalCSIDriver{} func InitGcePDExternalCSIDriver() TestDriver { return &gcePDExternalCSIDriver{ driverInfo: DriverInfo{ - Name: "com.google.csi.gcepd", + Name: "pd.csi.storage.gke.io", // TODO(#70258): this is temporary until we can figure out how to make e2e tests a library FeatureTag: "[Feature: gcePD-external]", MaxFileSize: testpatterns.FileSizeMedium, diff --git a/test/e2e/storage/testsuites/volumemode.go b/test/e2e/storage/testsuites/volumemode.go index 4854618bf41..6785fc60851 100644 --- a/test/e2e/storage/testsuites/volumemode.go +++ b/test/e2e/storage/testsuites/volumemode.go @@ -342,7 +342,7 @@ func testVolumeModeSuccessForDynamicPV(input *volumeModeTestInput) { var err error // TODO: This skip should be removed once #70760 is fixed - skipTestUntilBugfix("70760", input.driverName, []string{"com.google.csi.gcepd"}) + skipTestUntilBugfix("70760", input.driverName, []string{"pd.csi.storage.gke.io"}) By("Creating sc") input.sc, err = cs.StorageV1().StorageClasses().Create(input.sc) diff --git a/test/e2e/testing-manifests/storage-csi/driver-registrar/rbac.yaml b/test/e2e/testing-manifests/storage-csi/driver-registrar/rbac.yaml index a4f4f1aacef..cd256039555 100644 --- a/test/e2e/testing-manifests/storage-csi/driver-registrar/rbac.yaml +++ b/test/e2e/testing-manifests/storage-csi/driver-registrar/rbac.yaml @@ -11,7 +11,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: csi-driver-registrar + name: csi-node-sa # replace with non-default namespace name namespace: default @@ -42,7 +42,7 @@ metadata: name: csi-driver-registrar-role subjects: - kind: ServiceAccount - name: csi-driver-registrar + name: csi-node-sa # replace with non-default namespace name namespace: default roleRef: 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 0cb4476d4be..0cdf4764e77 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 @@ -1,54 +1,51 @@ kind: StatefulSet apiVersion: apps/v1 metadata: - name: csi-gce-controller + name: csi-gce-pd-controller spec: serviceName: "csi-gce-pd" replicas: 1 selector: matchLabels: - app: csi-gce-pd-driver + app: gcp-compute-persistent-disk-csi-driver template: metadata: labels: - app: csi-gce-pd-driver + app: gcp-compute-persistent-disk-csi-driver spec: - serviceAccountName: csi-controller + serviceAccountName: csi-controller-sa containers: - - name: csi-external-provisioner - imagePullPolicy: Always - image: gcr.io/gke-release/csi-provisioner:v0.4.1-gke.0 + - name: csi-provisioner + image: gcr.io/gke-release/csi-provisioner:v1.0.0-gke.0 args: - "--v=5" - - "--provisioner=com.google.csi.gcepd" + - "--provisioner=pd.csi.storage.gke.io" - "--csi-address=/csi/csi.sock" volumeMounts: - name: socket-dir mountPath: /csi - name: csi-attacher - imagePullPolicy: Always - image: gcr.io/gke-release/csi-attacher:v0.4.1-gke.0 + image: gcr.io/gke-release/csi-attacher:v1.0.0-gke.0 args: - "--v=5" - "--csi-address=/csi/csi.sock" volumeMounts: - name: socket-dir mountPath: /csi - - name: gce-driver - imagePullPolicy: Always - image: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v0.2.0-gke.0 + - name: gce-pd-driver + image: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v0.3.0-gke.0 args: - "--v=5" - - "--endpoint=unix:///csi/csi.sock" + - "--endpoint=unix:/csi/csi.sock" env: - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/service-account/cloud-sa.json" + value: "/etc/cloud-sa/cloud-sa.json" volumeMounts: - name: socket-dir mountPath: /csi - name: cloud-sa-volume readOnly: true - mountPath: "/etc/service-account" + mountPath: "/etc/cloud-sa" volumes: - name: socket-dir emptyDir: {} diff --git a/test/e2e/testing-manifests/storage-csi/gce-pd/csi-controller-rbac.yaml b/test/e2e/testing-manifests/storage-csi/gce-pd/csi-controller-rbac.yaml index 2e143302f9e..55417c4b4be 100644 --- a/test/e2e/testing-manifests/storage-csi/gce-pd/csi-controller-rbac.yaml +++ b/test/e2e/testing-manifests/storage-csi/gce-pd/csi-controller-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: csi-controller + name: csi-controller-sa --- kind: ClusterRoleBinding @@ -10,7 +10,7 @@ metadata: name: csi-controller-attacher-role subjects: - kind: ServiceAccount - name: csi-controller + name: csi-controller-sa namespace: default roleRef: kind: ClusterRole @@ -25,7 +25,7 @@ metadata: namespace: default subjects: - kind: ServiceAccount - name: csi-controller + name: csi-controller-sa namespace: default roleRef: kind: Role @@ -38,7 +38,7 @@ metadata: name: csi-controller-provisioner-role subjects: - kind: ServiceAccount - name: csi-controller + name: csi-controller-sa namespace: default roleRef: kind: ClusterRole @@ -53,7 +53,7 @@ metadata: namespace: default subjects: - kind: ServiceAccount - name: csi-controller + name: csi-controller-sa namespace: default roleRef: kind: Role @@ -67,10 +67,10 @@ metadata: name: psp-csi-controller-driver-registrar-role subjects: - kind: ServiceAccount - name: csi-controller + name: csi-controller-sa namespace: default - kind: ServiceAccount - name: csi-driver-registrar + name: csi-node-sa namespace: default roleRef: kind: ClusterRole diff --git a/test/e2e/testing-manifests/storage-csi/gce-pd/node_ds.yaml b/test/e2e/testing-manifests/storage-csi/gce-pd/node_ds.yaml index 9c0a8b8d3f0..df6eb8473bd 100644 --- a/test/e2e/testing-manifests/storage-csi/gce-pd/node_ds.yaml +++ b/test/e2e/testing-manifests/storage-csi/gce-pd/node_ds.yaml @@ -1,26 +1,28 @@ kind: DaemonSet apiVersion: apps/v1 metadata: - name: csi-gce-node + name: csi-gce-pd-node spec: selector: matchLabels: - app: csi-gce-driver - serviceName: csi-gce + app: gcp-compute-persistent-disk-csi-driver template: metadata: labels: - app: csi-gce-driver + app: gcp-compute-persistent-disk-csi-driver spec: - serviceAccountName: csi-driver-registrar + serviceAccountName: csi-node-sa containers: - name: csi-driver-registrar - imagePullPolicy: Always - image: gcr.io/gke-release/csi-driver-registrar:v0.4.1-gke.0 + image: gcr.io/gke-release/csi-driver-registrar:v1.0.0-gke.0 args: - "--v=5" - - "--csi-address=/csi/csi.sock" - - "--kubelet-registration-path=/var/lib/kubelet/plugins/com.google.csi.gcepd/csi.sock" + - "--csi-address=/var/lib/kubelet/plugins/pd.csi.storage.gke.io/csi.sock" + - "--kubelet-registration-path=/var/lib/kubelet/plugins/pd.csi.storage.gke.io/csi.sock" + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "rm -rf /registration/pd.csi.storage.gke.io /registration/pd.csi.storage.gke.io-reg.sock"] env: - name: KUBE_NODE_NAME valueFrom: @@ -28,17 +30,16 @@ spec: fieldPath: spec.nodeName volumeMounts: - name: plugin-dir - mountPath: /csi + mountPath: /var/lib/kubelet/plugins/pd.csi.storage.gke.io/ - name: registration-dir mountPath: /registration - - name: gce-driver + - name: gce-pd-driver securityContext: privileged: true - imagePullPolicy: Always - image: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v0.2.0-gke.0 + image: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v0.3.0-gke.0 args: - "--v=5" - - "--endpoint=unix:///csi/csi.sock" + - "--endpoint=unix:/csi/csi.sock" volumeMounts: - name: kubelet-dir mountPath: /var/lib/kubelet @@ -67,7 +68,7 @@ spec: type: Directory - name: plugin-dir hostPath: - path: /var/lib/kubelet/plugins/com.google.csi.gcepd/ + path: /var/lib/kubelet/plugins/pd.csi.storage.gke.io/ type: DirectoryOrCreate - name: device-dir hostPath: @@ -90,4 +91,3 @@ spec: hostPath: path: /sys type: Directory - diff --git a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-attacher.yaml b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-attacher.yaml index 6fe198bd3ab..dc2d4c4b7e8 100644 --- a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-attacher.yaml +++ b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-attacher.yaml @@ -30,7 +30,7 @@ spec: serviceAccountName: csi-attacher containers: - name: csi-attacher - image: quay.io/k8scsi/csi-attacher:v0.4.1 + image: gcr.io/gke-release/csi-attacher:v1.0.0-gke.0 args: - --v=5 - --csi-address=$(ADDRESS) diff --git a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-provisioner.yaml b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-provisioner.yaml index 84b2c05baad..4f117e11284 100644 --- a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-provisioner.yaml +++ b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-provisioner.yaml @@ -30,7 +30,7 @@ spec: serviceAccountName: csi-provisioner containers: - name: csi-provisioner - image: quay.io/k8scsi/csi-provisioner:v0.4.1 + image: gcr.io/gke-release/csi-provisioner:v1.0.0-gke.0 args: - "--provisioner=csi-hostpath" - "--csi-address=$(ADDRESS)" diff --git a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpathplugin.yaml b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpathplugin.yaml index f7c326b4a87..4df7cea194d 100644 --- a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpathplugin.yaml +++ b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpathplugin.yaml @@ -11,11 +11,11 @@ spec: labels: app: csi-hostpathplugin spec: - serviceAccountName: csi-driver-registrar + serviceAccountName: csi-node-sa hostNetwork: true containers: - name: driver-registrar - image: quay.io/k8scsi/driver-registrar:v0.4.1 + image: gcr.io/gke-release/csi-driver-registrar:v1.0.0-gke.0 args: - --v=5 - --csi-address=/csi/csi.sock @@ -33,7 +33,7 @@ spec: - mountPath: /registration name: registration-dir - name: hostpath - image: quay.io/k8scsi/hostpathplugin:v0.4.1 + image: quay.io/k8scsi/hostpathplugin:v1.0.0 args: - "--v=5" - "--endpoint=$(CSI_ENDPOINT)" diff --git a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/e2e-test-rbac.yaml b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/e2e-test-rbac.yaml index 1628db1b588..aa008ecac29 100644 --- a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/e2e-test-rbac.yaml +++ b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/e2e-test-rbac.yaml @@ -8,7 +8,7 @@ subjects: name: csi-attacher namespace: default - kind: ServiceAccount - name: csi-driver-registrar + name: csi-node-sa namespace: default - kind: ServiceAccount name: csi-provisioner