Skip to content

Commit a8bb40f

Browse files
committed
Updated variable name
Signed-off-by: Arashad Ahamad <[email protected]>
1 parent 7e62b8b commit a8bb40f

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

Diff for: deploy/kubernetes/storageclass/ibmc-vpc-block-sdp-StorageClass.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ provisioner: vpc.block.csi.ibm.io
66
parameters:
77
profile: "sdp"
88
iops: "100"
9-
bandwidth: "1000"
9+
throughput: "1000"
1010
csi.storage.k8s.io/fstype: "ext4"
1111
billingType: "hourly"
1212
encrypted: "false"

Diff for: pkg/ibmcsidriver/constants.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ const (
129129
// MinimumSDPVolumeSizeInBytes ... This is minimum size require for sdp (acadia profile)
130130
MinimumSDPVolumeSizeInBytes int64 = 1 * utils.GiB
131131

132-
// Bandwidth ...
133-
Bandwidth = "bandwidth"
132+
// Throughput ...
133+
Throughput = "throughput"
134134
)
135135

136136
// SupportedFS the supported FS types

Diff for: pkg/ibmcsidriver/controller_helper.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func getVolumeParameters(logger *zap.Logger, req *csi.CreateVolumeRequest, confi
168168
iops := value
169169
volume.Iops = &iops
170170
}
171-
case Bandwidth: // getting bandwidth value from storage class if it is provided
171+
case Throughput: // getting throughput value from storage class if it is provided
172172
if len(value) != 0 {
173173
bandwidth, err := strconv.ParseInt(value, 10, 32)
174174
if err != nil {
@@ -326,6 +326,15 @@ func overrideParams(logger *zap.Logger, req *csi.CreateVolumeRequest, config *co
326326
iops := value
327327
volume.Iops = &iops
328328
}
329+
case Throughput: // getting throughput value from storage class if it is provided
330+
if len(value) != 0 {
331+
bandwidth, err := strconv.ParseInt(value, 10, 32)
332+
if err != nil {
333+
err = fmt.Errorf("'<%v>' is invalid, value of '%s' should be an int32 type", value, key)
334+
} else {
335+
volume.Bandwidth = int32(bandwidth)
336+
}
337+
}
329338
default:
330339
err = fmt.Errorf("<%s> is an invalid parameter", key)
331340
}

0 commit comments

Comments
 (0)