Adding throughput
field for volumes in provider spec
#95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR makes it possible to configure
throughput
for different volume types. As of today it is configurable only forgp3
volume type and will return an error from the provider side if specified for any other volume type.Which issue(s) this PR fixes:
Fixes #93
Special notes for your reviewer:
The following tests were performed on a cluster in the dev landscape:- (Current range of throughput is
125MiB/s - 1000MiB/s
)(The throughput field is configured in machine class yaml and then a machine is deleted to trigger the creation of new machines. The machine controllers are run locally after scaling down the mcm running in the control plane of the dev cluster.)
-100
, Volume Type ={gp3, io1, gp2}
--> Error is returned with the following message:-Invalid value: -100: throughput must be a positive value
300
, Volume Type ={gp2, io1}
--> Error message is as follows:-InvalidBlockDeviceMapping: throughput cannot be specified with the volumeType of device '/dev/xvda'\n\tstatus code: 400
300
, IOPS=3500
, Volume Type =gp3
--> Machine with throughput=300
and IOPS=3500
is created.1001
, IOPS=3500
, Volume Type =gp3
--> Error message is as follows:-InvalidParameterValue: Volume throughput of 1001 is too high; maximum is 1000.\n\tstatus code: 400
100
, IOPS=3500
, Volume Type =gp3
--> machine with throughput=125
and IOPS =3500
is created.In all the above cases where an error is returned, it will be shown as part of the machine status in the machine yaml. The state of the machine will be
CrashloopBackoff
.Release note: