Skip to content

Commit 35d3d55

Browse files
committed
Merge remote-tracking branch 'upstream/master' into multi-witer
2 parents 8081b51 + 66899b6 commit 35d3d55

File tree

9 files changed

+30
-15
lines changed

9 files changed

+30
-15
lines changed

deploy/kubernetes/images/prow-stable-sidecar-rc-master/image.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ metadata:
4848
imageTag:
4949
name: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver
5050
newName: gcr.io/k8s-staging-cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver
51-
newTag: "v1.15.2-rc2"
51+
newTag: "v1.15.2-rc3"
5252
---
5353

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- op: add
2+
path: /spec/template/spec/containers/0/args/-
3+
value: --supports-dynamic-throughput-provisioning=hyperdisk-balanced,hyperdisk-throughput,hyperdisk-ml
4+
5+
- op: add
6+
path: /spec/template/spec/containers/0/args/-
7+
value: --supports-dynamic-iops-provisioning=hyperdisk-balanced,hyperdisk-extreme

deploy/kubernetes/overlays/dev/kustomization.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ resources:
99
# Here dev overlay is using the same image as alpha
1010
transformers:
1111
- ../../images/stable-master
12+
# Apply patches to support dynamic provisioning for hyperdisks
13+
patches:
14+
- path: ./driver-args.yaml
15+
target:
16+
group: apps
17+
version: v1
18+
kind: Deployment
19+
name: csi-gce-pd-controller
1220
# To change the dev image, add something like the following.
1321
#images:
1422
#- name: gke.gcr.io/gcp-compute-persistent-disk-csi-driver

examples/kubernetes/demo-vol-create.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ metadata:
1616
driverName: pd.csi.storage.gke.io
1717
parameters:
1818
iops: "3000"
19-
throughput: "150Mi"
19+
throughput: "150"
2020
---
2121
apiVersion: storage.k8s.io/v1beta1
2222
kind: VolumeAttributesClass
@@ -25,7 +25,7 @@ metadata:
2525
driverName: pd.csi.storage.gke.io
2626
parameters:
2727
iops: "3013"
28-
throughput: "151Mi"
28+
throughput: "151"
2929
---
3030
apiVersion: v1
3131
kind: PersistentVolumeClaim

pkg/common/parameters.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ func ExtractModifyVolumeParameters(parameters map[string]string) (ModifyVolumePa
343343
}
344344
modifyVolumeParams.IOPS = &iops
345345
case "throughput":
346-
throughput, err := ConvertMiStringToInt64(value)
346+
throughput, err := ConvertStringToInt64(value)
347347
if err != nil {
348348
return ModifyVolumeParameters{}, fmt.Errorf("parameters contain invalid throughput parameter: %w", err)
349349
}

pkg/common/parameters_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ func TestSnapshotParameters(t *testing.T) {
485485
func TestExtractModifyVolumeParameters(t *testing.T) {
486486
parameters := map[string]string{
487487
"iops": "1000",
488-
"throughput": "500Mi",
488+
"throughput": "500",
489489
}
490490

491491
iops := int64(1000)

pkg/gce-pd-csi-driver/controller_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,7 @@ func TestCreateVolumeWithVolumeAttributeClassParameters(t *testing.T) {
17891789
},
17901790
},
17911791
},
1792-
MutableParameters: map[string]string{"iops": "20000", "throughput": "600Mi"},
1792+
MutableParameters: map[string]string{"iops": "20000", "throughput": "600"},
17931793
},
17941794
expIops: 20000,
17951795
expThroughput: 600,
@@ -1822,7 +1822,7 @@ func TestCreateVolumeWithVolumeAttributeClassParameters(t *testing.T) {
18221822
},
18231823
},
18241824
},
1825-
MutableParameters: map[string]string{"iops": "20000", "throughput": "600Mi"},
1825+
MutableParameters: map[string]string{"iops": "20000", "throughput": "600"},
18261826
},
18271827
expIops: 0,
18281828
expThroughput: 0,
@@ -1890,7 +1890,7 @@ func TestVolumeModifyOperation(t *testing.T) {
18901890
name: "Update volume with valid parameters",
18911891
req: &csi.ControllerModifyVolumeRequest{
18921892
VolumeId: testVolumeID,
1893-
MutableParameters: map[string]string{"iops": "20000", "throughput": "600Mi"},
1893+
MutableParameters: map[string]string{"iops": "20000", "throughput": "600"},
18941894
},
18951895
diskType: "hyperdisk-balanced",
18961896
params: &common.DiskParameters{
@@ -1906,7 +1906,7 @@ func TestVolumeModifyOperation(t *testing.T) {
19061906
name: "Update volume with invalid parameters",
19071907
req: &csi.ControllerModifyVolumeRequest{
19081908
VolumeId: testVolumeID,
1909-
MutableParameters: map[string]string{"iops": "0", "throughput": "0Mi"},
1909+
MutableParameters: map[string]string{"iops": "0", "throughput": "0"},
19101910
},
19111911
diskType: "hyperdisk-balanced",
19121912
params: &common.DiskParameters{
@@ -1922,7 +1922,7 @@ func TestVolumeModifyOperation(t *testing.T) {
19221922
name: "Update volume with valid parameters but invalid disk type",
19231923
req: &csi.ControllerModifyVolumeRequest{
19241924
VolumeId: testVolumeID,
1925-
MutableParameters: map[string]string{"iops": "20000", "throughput": "600Mi"},
1925+
MutableParameters: map[string]string{"iops": "20000", "throughput": "600"},
19261926
},
19271927
diskType: "pd-ssd",
19281928
params: &common.DiskParameters{
@@ -2053,7 +2053,7 @@ func TestVolumeModifyErrorHandling(t *testing.T) {
20532053
},
20542054
},
20552055
modifyReq: &csi.ControllerModifyVolumeRequest{
2056-
MutableParameters: map[string]string{"iops": "3001", "throughput": "151Mi"},
2056+
MutableParameters: map[string]string{"iops": "3001", "throughput": "151"},
20572057
},
20582058
modifyVolumeErrors: map[*meta.Key]error{
20592059
meta.ZonalKey(name, "us-central1-a"): &googleapi.Error{
@@ -2089,7 +2089,7 @@ func TestVolumeModifyErrorHandling(t *testing.T) {
20892089
},
20902090
},
20912091
modifyReq: &csi.ControllerModifyVolumeRequest{
2092-
MutableParameters: map[string]string{"iops": "10000", "throughput": "2400Mi"},
2092+
MutableParameters: map[string]string{"iops": "10000", "throughput": "2400"},
20932093
},
20942094
modifyVolumeErrors: map[*meta.Key]error{
20952095
meta.ZonalKey(name, "us-central1-a"): &googleapi.Error{Code: int(codes.InvalidArgument), Message: "InvalidArgument"},

test/e2e/tests/single_zone_e2e_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
16221622
stringPtr(provisionedIOPSOnCreateHdb),
16231623
stringPtr(provisionedThroughputOnCreateHdb),
16241624
stringPtr("3013"),
1625-
stringPtr("181Mi"),
1625+
stringPtr("181"),
16261626
),
16271627
Entry(
16281628
"for hyperdisk-extreme",
@@ -1640,7 +1640,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
16401640
nil,
16411641
stringPtr(provisionedThroughputOnCreate),
16421642
nil,
1643-
stringPtr("70Mi"),
1643+
stringPtr("70"),
16441644
),
16451645
)
16461646
})

test/k8s-integration/config/hdb-volumeattributesclass.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ metadata:
55
driverName: pd.csi.storage.gke.io
66
parameters:
77
iops: "3600"
8-
throughput: "290Mi"
8+
throughput: "290"

0 commit comments

Comments
 (0)