-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Document etcd volume options + fail fast if ratio is too high #6035
Conversation
This commit adds documentation around the options for the etcd volumes: volumeType and volumeIops, in addition to the already existing documentation for volumeSize Fixes #4557
Hi @Vlaaaaaaad. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
CLA refresh comment |
In AWS the ratio between volume IOPS and volume size must be at most 50, otherwise volume will fail creating. See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html, specifically "_The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. For example, a 100 GiB volume can be provisioned with up to 5,000 IOPS._" This commit adds the option of failing fast when creating a new cluster if the ratio is higher than 50. Previously kops would send the API request to AWS, fail and repeat until the timeout was reached.
@@ -85,19 +85,23 @@ etcdClusters: | |||
|
|||
> __Note:__ The images for etcd that kops uses are from the Google Cloud Repository. Google doesn't release every version of etcd to the gcr. Check that the version of etcd you want to use is available [at the gcr](https://console.cloud.google.com/gcr/images/google-containers/GLOBAL/etcd?gcrImageListsize=50) before using it in your cluster spec. | |||
|
|||
By default, the Volumes created for the etcd clusters are 20GB each. They can be adjusted via the `volumeSize` parameter. | |||
By default, the Volumes created for the etcd clusters are `gp2` and 20GB each. The volume size, type and Iops( for `io1`) can be configured via their parameters. Conversion between `gp2` and `io1` is not supported, nor are size changes. |
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.
Docs look great - much clearer, thank you!
@@ -160,9 +163,16 @@ func (b *MasterVolumeBuilder) addAWSVolume(c *fi.ModelBuilderContext, name strin | |||
} | |||
if volumeType == "io1" { | |||
t.VolumeIops = i64(int64(volumeIops)) | |||
|
|||
// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html |
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.
So it would probably be better to do this validation earlier - you will only get told about this when you do kops update cluster
, but it would be nice to tell people earlier. (Just as k8s, validates objects and tries to prevent invalid changes - for example you can't update pod limits to a negative resource value ... I think!).
In kops, this would mean putting it here: https://github.com/kubernetes/kops/blob/master/pkg/apis/kops/validation/aws.go#L39
But it's fine to have both validations, and it's a bit more tricky to add it to the validation because the etcd validation is currently spread out across a few files and not comprehensive (as you've found!) So we can leave this here.
I do have another concern, which is that we're hard-coding an AWS limit, and that limit might change, but we can add it and see if/when it changes. It likely won't change too often :-)
Would be great for us to clean up our etcd validation, but that shouldn't block this PR :-) I also have some concerns over hard-coding an AWS limit which seems like it could change, but I'm happy to put it in and see how much of a problem that is, as I don't think AWS changes these sorts of limits too often. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justinsb, Vlaaaaaaad The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR adds documentation around the options for the etcd volumes:
volumeType
andvolumeIops
, in addition to the already existing documentation forvolumeSize
Fixes #4557