-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add constants and documentation around AWS magic numbers #31115
Conversation
Also, remove check for IOPS per GB, AWS checks it on its own.
Yay variables and reuse. |
const ( | ||
MaxIOPSPerGB = 50 | ||
MinTotalIOPS = 100 | ||
MaxTotalIOPS = 20000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the EBS link, but I see the numbers are different for SSD and HDD drivers. Are we only considering SSD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IOPS can be set by user only for io1
volumes, IOPS for the rest of volumes is preset by AWS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
if volumeOptions.IOPSPerGB <= 0 || volumeOptions.IOPSPerGB > 30 { | ||
return "", fmt.Errorf("invalid iopsPerGB value %d, must be 0 < IOPSPerGB <= 30", volumeOptions.IOPSPerGB) | ||
if volumeOptions.IOPSPerGB <= 0 || volumeOptions.IOPSPerGB > MaxIOPSPerGB { | ||
return "", fmt.Errorf("invalid iopsPerGB value %d, must be 0 < IOPSPerGB <= %d", volumeOptions.IOPSPerGB, MaxIOPSPerGB) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid --> Invalid?
fd1075c
to
a596668
Compare
removed checking of iopsPerGB, aws will do it on our behalf. Left capping at 20 000 IOPS. |
@jingxu97, PTAL. |
GCE e2e build/test passed for commit a596668. |
LGTM |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit a596668. |
Automatic merge from submit-queue |
Also, bumped max IOPS/GB to 50, it changed from 30 since last time I checked.
Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
@kubernetes/sig-storage
This change is