-
Notifications
You must be signed in to change notification settings - Fork 540
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 extra root volume options #1498
✨ Add extra root volume options #1498
Conversation
Hi @johnharris85. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
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.
d187f47
to
1f9b806
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johnharris85, ncdc 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 |
/retest |
@vincepri pointed out on Slack this should have some restore logic built in to make sure we don't miss these fields from annotations. Will add that and address Andy's comments later today. |
Sounds good! Holding the PR until we have those in place /hold |
c31d35b
to
91ff282
Compare
Addressed most of @vincepri comments (except the size question) and rebased. |
@johnharris85 Regarding #1498, I think the only thing I'd add is a kubebuilder validation tag that checks that Size is greater than 0, and remove all the checks where we do This makes sure that when a user sets the |
func (s *Service) getImageSnapshotSize(imageID string) (*int64, error) { | ||
input := &ec2.DescribeImagesInput{ | ||
ImageIds: []*string{aws.String(imageID)}, | ||
} | ||
|
||
output, err := s.scope.EC2.DescribeImages(input) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if len(output.Images) == 0 { | ||
return nil, errors.Errorf("no images returned when looking up ID %q", imageID) | ||
} | ||
|
||
return output.Images[0].BlockDeviceMappings[0].Ebs.VolumeSize, nil | ||
} | ||
|
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.
This func is basically identical to the one above (to get the root device name), just returning a different attribute. Thoughts on adjusting the above one (which is only used once) to return size and name to save an AWS call?
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.
+1 to consolidating the calls. This can also be handled as a followup.
config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml
Show resolved
Hide resolved
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.
/lgtm
@ncdc over to you to un-hold
Discussion w/ @vincepri on Slack around how to handle the size wrt defaults / validation -> https://app.slack.com/client/T09NY5SBT/CD6U2V71N/thread/CD6U2V71N-1580776492.150700. Addressed all comments I think but left a couple questions in for feedback, can squash when ready. |
Failure looks like generation out of date, but |
@johnharris85 try to rebase on top of master |
c76f066
to
1c785f6
Compare
1c785f6
to
66b4292
Compare
@johnharris85 seems linting errors now |
Should probably queue this one after #1525 so we get the object fuzzer, and then this will then need rebasing I think. |
0ca9fe7
to
1f80852
Compare
OK rebased now #1525 landed. Fuzzer found a couple bugs which I also fixed.
|
/unhold |
Should merge cleanly via 3-way, but merge after #1535 |
@johnharris85 could you please rebase & resolve conflicts - thanks! |
Signed-off-by: John Harris <joharris@vmware.com>
1f80852
to
80af1bc
Compare
/lgtm |
Signed-off-by: John Harris joharris@vmware.com
What this PR does / why we need it:
Allows users to specify additional options for a machine's root volume.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1403
Notes:
true
(even if it was omitted / set tofalse
). Thought this was a reasonable assumption, but open to changes there (error if key set but encrypted missing /false
).