Skip to content

Commit 2b73259

Browse files
authored
Merge pull request #1325 from sunnylovestiramisu/hdt-test
Update k8s-cloud-provider to v1.24.0 and add HdT e2e tests
2 parents 6145c8f + 0edc120 commit 2b73259

File tree

458 files changed

+129835
-42778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+129835
-42778
lines changed

go.mod

+20-16
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ go 1.20
44

55
require (
66
cloud.google.com/go/compute/metadata v0.2.3
7-
cloud.google.com/go/kms v1.6.0
8-
github.com/GoogleCloudPlatform/k8s-cloud-provider v1.18.0
7+
cloud.google.com/go/kms v1.12.1
8+
github.com/GoogleCloudPlatform/k8s-cloud-provider v1.24.0
99
github.com/container-storage-interface/spec v1.6.0
1010
github.com/google/uuid v1.3.0
1111
github.com/kubernetes-csi/csi-proxy/client v1.1.1
1212
github.com/kubernetes-csi/csi-test/v4 v4.4.0
1313
github.com/onsi/ginkgo/v2 v2.7.1
1414
github.com/onsi/gomega v1.25.0
15-
golang.org/x/oauth2 v0.5.0
16-
golang.org/x/sys v0.5.0
17-
google.golang.org/api v0.111.0
18-
google.golang.org/genproto v0.0.0-20230223222841-637eb2293923
19-
google.golang.org/grpc v1.53.0
20-
google.golang.org/protobuf v1.28.1
15+
golang.org/x/oauth2 v0.10.0
16+
golang.org/x/sys v0.10.0
17+
google.golang.org/api v0.134.0
18+
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130
19+
google.golang.org/grpc v1.56.2
20+
google.golang.org/protobuf v1.31.0
2121
gopkg.in/gcfg.v1 v1.2.3
2222
k8s.io/api v0.24.1
2323
k8s.io/apimachinery v0.24.1
@@ -31,8 +31,8 @@ require (
3131
)
3232

3333
require (
34-
cloud.google.com/go/compute v1.18.0 // indirect
35-
cloud.google.com/go/iam v0.11.0 // indirect
34+
cloud.google.com/go/compute v1.20.1 // indirect
35+
cloud.google.com/go/iam v1.1.0 // indirect
3636
github.com/Microsoft/go-winio v0.4.17 // indirect
3737
github.com/PuerkitoBio/purell v1.1.1 // indirect
3838
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
@@ -48,12 +48,13 @@ require (
4848
github.com/go-openapi/swag v0.21.1 // indirect
4949
github.com/gogo/protobuf v1.3.2 // indirect
5050
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
51-
github.com/golang/protobuf v1.5.2 // indirect
51+
github.com/golang/protobuf v1.5.3 // indirect
5252
github.com/google/gnostic v0.5.7-v3refs // indirect
5353
github.com/google/go-cmp v0.5.9 // indirect
5454
github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea // indirect
55-
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
56-
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
55+
github.com/google/s2a-go v0.1.4 // indirect
56+
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
57+
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
5758
github.com/hashicorp/errwrap v1.0.0 // indirect
5859
github.com/hashicorp/go-multierror v1.1.0 // indirect
5960
github.com/imdario/mergo v0.3.12 // indirect
@@ -76,11 +77,14 @@ require (
7677
github.com/spf13/pflag v1.0.5 // indirect
7778
go.opencensus.io v0.24.0 // indirect
7879
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
79-
golang.org/x/net v0.7.0 // indirect
80-
golang.org/x/term v0.5.0 // indirect
81-
golang.org/x/text v0.7.0 // indirect
80+
golang.org/x/crypto v0.11.0 // indirect
81+
golang.org/x/net v0.12.0 // indirect
82+
golang.org/x/term v0.10.0 // indirect
83+
golang.org/x/text v0.11.0 // indirect
8284
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
8385
google.golang.org/appengine v1.6.7 // indirect
86+
google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 // indirect
87+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230720185612-659f7aaaa771 // indirect
8488
gopkg.in/inf.v0 v0.9.1 // indirect
8589
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
8690
gopkg.in/warnings.v0 v0.1.2 // indirect

go.sum

+54-90
Large diffs are not rendered by default.

test/e2e/tests/setup_e2e_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var (
3838
project = flag.String("project", "", "Project to run tests in")
3939
serviceAccount = flag.String("service-account", "", "Service account to bring up instance with")
4040
architecture = flag.String("arch", "amd64", "Architecture pd csi driver build on")
41-
zones = flag.String("zones", "us-central1-c,us-central1-b", "Zones to run tests in. If there are multiple zones, separate each by comma")
41+
zones = flag.String("zones", "us-east4-a,us-east4-c", "Zones to run tests in. If there are multiple zones, separate each by comma")
4242
machineType = flag.String("machine-type", "n2-standard-2", "Type of machine to provision instance on")
4343
imageURL = flag.String("image-url", "projects/debian-cloud/global/images/family/debian-11", "OS image url to get image from")
4444
runInProw = flag.Bool("run-in-prow", false, "If true, use a Boskos loaned project and special CI service accounts and ssh keys")

test/e2e/tests/single_zone_e2e_test.go

+33-11
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,20 @@ import (
4444
const (
4545
testNamePrefix = "gcepd-csi-e2e-"
4646

47-
defaultSizeGb int64 = 5
48-
defaultExtremeSizeGb int64 = 500
49-
defaultRepdSizeGb int64 = 200
50-
defaultMwSizeGb int64 = 200
51-
defaultVolumeLimit int64 = 127
52-
readyState = "READY"
53-
standardDiskType = "pd-standard"
54-
extremeDiskType = "pd-extreme"
55-
provisionedIOPSOnCreate = "12345"
56-
provisionedIOPSOnCreateInt = int64(12345)
47+
defaultSizeGb int64 = 5
48+
defaultExtremeSizeGb int64 = 500
49+
defaultHdTSizeGb int64 = 2048
50+
defaultRepdSizeGb int64 = 200
51+
defaultMwSizeGb int64 = 200
52+
defaultVolumeLimit int64 = 127
53+
readyState = "READY"
54+
standardDiskType = "pd-standard"
55+
extremeDiskType = "pd-extreme"
56+
hdtDiskType = "hyperdisk-throughput"
57+
provisionedIOPSOnCreate = "12345"
58+
provisionedIOPSOnCreateInt = int64(12345)
59+
provisionedThroughputOnCreate = "66Mi"
60+
provisionedThroughputOnCreateInt = int64(66)
5761

5862
defaultEpsilon = 500000000 // 500M
5963
)
@@ -272,6 +276,10 @@ var _ = Describe("GCE PD CSI Driver", func() {
272276
client := testContext.Client
273277
instance := testContext.Instance
274278

279+
if diskType == hdtDiskType {
280+
z = "us-east4-a"
281+
}
282+
275283
volName, _ := createAndValidateUniqueZonalDisk(client, p, z, diskType)
276284

277285
underSpecifiedID := common.GenerateUnderspecifiedVolumeID(volName, true /* isZonal */)
@@ -292,6 +300,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
292300
},
293301
Entry("on pd-standard", standardDiskType),
294302
Entry("on pd-extreme", extremeDiskType),
303+
Entry("on hyperdisk-throughput", hdtDiskType),
295304
)
296305

297306
DescribeTable("Should complete publish/unpublish lifecycle with underspecified volume ID and missing volume",
@@ -1281,8 +1290,11 @@ func createAndValidateUniqueZonalDisk(client *remote.CsiClient, project, zone st
12811290
volName := testNamePrefix + string(uuid.NewUUID())
12821291

12831292
diskSize := defaultSizeGb
1284-
if diskType == extremeDiskType {
1293+
switch diskType {
1294+
case extremeDiskType:
12851295
diskSize = defaultExtremeSizeGb
1296+
case hdtDiskType:
1297+
diskSize = defaultHdTSizeGb
12861298
}
12871299
volume, err := client.CreateVolume(volName, disk.params, diskSize,
12881300
&csi.TopologyRequirement{
@@ -1445,6 +1457,16 @@ var typeToDisk = map[string]*disk{
14451457
Expect(disk.ProvisionedIops).To(Equal(provisionedIOPSOnCreateInt))
14461458
},
14471459
},
1460+
hdtDiskType: {
1461+
params: map[string]string{
1462+
common.ParameterKeyType: hdtDiskType,
1463+
common.ParameterKeyProvisionedThroughputOnCreate: provisionedThroughputOnCreate,
1464+
},
1465+
validate: func(disk *compute.Disk) {
1466+
Expect(disk.Type).To(ContainSubstring(hdtDiskType))
1467+
Expect(disk.ProvisionedThroughput).To(Equal(provisionedThroughputOnCreateInt))
1468+
},
1469+
},
14481470
}
14491471

14501472
func merge(a, b map[string]string) map[string]string {

vendor/cloud.google.com/go/compute/internal/version.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/cloud.google.com/go/iam/CHANGES.md

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/cloud.google.com/go/iam/apiv1/iampb/iam_policy.pb.go

+22-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/cloud.google.com/go/iam/apiv1/iampb/options.pb.go

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)