Skip to content

Commit 2bb35ca

Browse files
authored
Merge pull request kubernetes#84312 from davidz627/tests/pd
Add updated v0.6.0 stable PD driver specs - enable block tests for PD
2 parents 24ae4d6 + d1383aa commit 2bb35ca

File tree

4 files changed

+100
-37
lines changed

4 files changed

+100
-37
lines changed

test/e2e/storage/drivers/csi.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,16 @@ func InitGcePDCSIDriver() testsuites.TestDriver {
389389
SupportedMountOption: sets.NewString("debug", "nouid32"),
390390
Capabilities: map[testsuites.Capability]bool{
391391
testsuites.CapPersistence: true,
392+
testsuites.CapBlock: true,
392393
testsuites.CapFsGroup: true,
393394
testsuites.CapExec: true,
394395
testsuites.CapMultiPODs: true,
395396
// GCE supports volume limits, but the test creates large
396397
// number of volumes and times out test suites.
397-
testsuites.CapVolumeLimits: false,
398-
testsuites.CapTopology: true,
398+
testsuites.CapVolumeLimits: false,
399+
testsuites.CapTopology: true,
400+
testsuites.CapControllerExpansion: true,
401+
testsuites.CapNodeExpansion: true,
399402
},
400403
RequiredAccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce},
401404
TopologyKeys: []string{GCEPDCSIZoneTopologyKey},

test/e2e/testing-manifests/storage-csi/gce-pd/controller_ss.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ spec:
1313
labels:
1414
app: gcp-compute-persistent-disk-csi-driver
1515
spec:
16-
serviceAccountName: csi-controller-sa
16+
serviceAccountName: csi-gce-pd-controller-sa
1717
containers:
1818
- name: csi-provisioner
19-
# TODO: replace with official 1.4.0 release when ready
20-
image: quay.io/k8scsi/csi-provisioner:v1.4.0-rc1
19+
image: gcr.io/gke-release/csi-provisioner:v1.4.0-gke.0
2120
args:
2221
- "--v=5"
2322
- "--csi-address=/csi/csi.sock"
@@ -26,15 +25,23 @@ spec:
2625
- name: socket-dir
2726
mountPath: /csi
2827
- name: csi-attacher
29-
image: gcr.io/gke-release/csi-attacher:v1.2.0-gke.0
28+
image: gcr.io/gke-release/csi-attacher:v2.0.0-gke.0
29+
args:
30+
- "--v=5"
31+
- "--csi-address=/csi/csi.sock"
32+
volumeMounts:
33+
- name: socket-dir
34+
mountPath: /csi
35+
- name: csi-resizer
36+
image: gcr.io/gke-release/csi-resizer:v0.3.0-gke.0
3037
args:
3138
- "--v=5"
3239
- "--csi-address=/csi/csi.sock"
3340
volumeMounts:
3441
- name: socket-dir
3542
mountPath: /csi
3643
- name: gce-pd-driver
37-
image: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v0.5.2-gke.0
44+
image: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v0.6.0-gke.0
3845
args:
3946
- "--v=5"
4047
- "--endpoint=unix:/csi/csi.sock"

test/e2e/testing-manifests/storage-csi/gce-pd/csi-controller-rbac.yaml

Lines changed: 81 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,116 @@
1+
##### Controller Service Account, Roles, Rolebindings
12
apiVersion: v1
23
kind: ServiceAccount
34
metadata:
4-
name: csi-controller-sa
5+
name: csi-gce-pd-controller-sa
56

67
---
8+
# xref: https://github.com/kubernetes-csi/external-provisioner/blob/master/deploy/kubernetes/rbac.yaml
9+
kind: ClusterRole
10+
apiVersion: rbac.authorization.k8s.io/v1
11+
metadata:
12+
name: csi-gce-pd-provisioner-role
13+
rules:
14+
- apiGroups: [""]
15+
resources: ["persistentvolumes"]
16+
verbs: ["get", "list", "watch", "create", "delete"]
17+
- apiGroups: [""]
18+
resources: ["persistentvolumeclaims"]
19+
verbs: ["get", "list", "watch", "update"]
20+
- apiGroups: ["storage.k8s.io"]
21+
resources: ["storageclasses"]
22+
verbs: ["get", "list", "watch"]
23+
- apiGroups: [""]
24+
resources: ["events"]
25+
verbs: ["list", "watch", "create", "update", "patch"]
26+
- apiGroups: ["storage.k8s.io"]
27+
resources: ["csinodes"]
28+
verbs: ["get", "list", "watch"]
29+
- apiGroups: [""]
30+
resources: ["nodes"]
31+
verbs: ["get", "list", "watch"]
32+
33+
---
34+
735
kind: ClusterRoleBinding
836
apiVersion: rbac.authorization.k8s.io/v1
937
metadata:
10-
name: csi-controller-attacher-role
38+
name: csi-gce-pd-controller-provisioner-binding
1139
subjects:
1240
- kind: ServiceAccount
13-
name: csi-controller-sa
14-
namespace: default
41+
name: csi-gce-pd-controller-sa
1542
roleRef:
1643
kind: ClusterRole
17-
name: external-attacher-runner
44+
name: csi-gce-pd-provisioner-role
1845
apiGroup: rbac.authorization.k8s.io
19-
46+
2047
---
21-
kind: RoleBinding
48+
# xref: https://github.com/kubernetes-csi/external-attacher/blob/master/deploy/kubernetes/rbac.yaml
49+
kind: ClusterRole
2250
apiVersion: rbac.authorization.k8s.io/v1
2351
metadata:
24-
name: csi-controller-attacher-role-cfg
25-
namespace: default
26-
subjects:
27-
- kind: ServiceAccount
28-
name: csi-controller-sa
29-
namespace: default
30-
roleRef:
31-
kind: Role
32-
name: external-attacher-cfg
52+
name: csi-gce-pd-attacher-role
53+
rules:
54+
- apiGroups: [""]
55+
resources: ["persistentvolumes"]
56+
verbs: ["get", "list", "watch", "update", "patch"]
57+
- apiGroups: [""]
58+
resources: ["nodes"]
59+
verbs: ["get", "list", "watch"]
60+
- apiGroups: ["storage.k8s.io"]
61+
resources: ["csinodes"]
62+
verbs: ["get", "list", "watch"]
63+
- apiGroups: ["storage.k8s.io"]
64+
resources: ["volumeattachments"]
65+
verbs: ["get", "list", "watch", "update", "patch"]
3366

3467
---
68+
3569
kind: ClusterRoleBinding
3670
apiVersion: rbac.authorization.k8s.io/v1
3771
metadata:
38-
name: csi-controller-provisioner-role
72+
name: csi-gce-pd-controller-attacher-binding
3973
subjects:
4074
- kind: ServiceAccount
41-
name: csi-controller-sa
42-
namespace: default
75+
name: csi-gce-pd-controller-sa
4376
roleRef:
4477
kind: ClusterRole
45-
name: external-provisioner-runner
78+
name: csi-gce-pd-attacher-role
4679
apiGroup: rbac.authorization.k8s.io
4780

4881
---
49-
kind: RoleBinding
82+
83+
# Resizer must be able to work with PVCs, PVs, SCs.
84+
kind: ClusterRole
5085
apiVersion: rbac.authorization.k8s.io/v1
5186
metadata:
52-
name: csi-controller-provisioner-role-cfg
53-
namespace: default
87+
name: csi-gce-pd-resizer-role
88+
rules:
89+
- apiGroups: [""]
90+
resources: ["persistentvolumes"]
91+
verbs: ["get", "list", "watch", "update", "patch"]
92+
- apiGroups: [""]
93+
resources: ["persistentvolumeclaims"]
94+
verbs: ["get", "list", "watch"]
95+
- apiGroups: [""]
96+
resources: ["persistentvolumeclaims/status"]
97+
verbs: ["update", "patch"]
98+
- apiGroups: [""]
99+
resources: ["events"]
100+
verbs: ["list", "watch", "create", "update", "patch"]
101+
102+
---
103+
kind: ClusterRoleBinding
104+
apiVersion: rbac.authorization.k8s.io/v1
105+
metadata:
106+
name: csi-gce-pd-resizer-binding
54107
subjects:
55108
- kind: ServiceAccount
56-
name: csi-controller-sa
57-
namespace: default
109+
name: csi-gce-pd-controller-sa
58110
roleRef:
59-
kind: Role
60-
name: external-provisioner-cfg
111+
kind: ClusterRole
112+
name: csi-gce-pd-resizer-role
113+
apiGroup: rbac.authorization.k8s.io
61114

62115
---
63116
# priviledged Pod Security Policy, previously defined via PrivilegedTestPSPClusterRoleBinding()
@@ -67,7 +120,7 @@ metadata:
67120
name: psp-csi-controller-driver-registrar-role
68121
subjects:
69122
- kind: ServiceAccount
70-
name: csi-controller-sa
123+
name: csi-gce-pd-controller-sa
71124
namespace: default
72125
roleRef:
73126
kind: ClusterRole

test/e2e/testing-manifests/storage-csi/gce-pd/node_ds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
spec:
1414
containers:
1515
- name: csi-driver-registrar
16-
image: gcr.io/gke-release/csi-node-driver-registrar:v1.1.0-gke.0
16+
image: gcr.io/gke-release/csi-node-driver-registrar:v1.2.0-gke.0
1717
args:
1818
- "--v=5"
1919
- "--csi-address=/csi/csi.sock"
@@ -35,7 +35,7 @@ spec:
3535
- name: gce-pd-driver
3636
securityContext:
3737
privileged: true
38-
image: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v0.5.2-gke.0
38+
image: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v0.6.0-gke.0
3939
args:
4040
- "--v=5"
4141
- "--endpoint=unix:/csi/csi.sock"

0 commit comments

Comments
 (0)