-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Enable use of existing subnets #305
Conversation
9632225
to
3e4c6d6
Compare
- refactor conditional logic for readability - add more flag compatibility validation - print warning to ensure that configuring the VPC and subnets is user's responsibility
3e4c6d6
to
d825a04
Compare
|
||
for _, subnet := range output.Subnets { | ||
if c.Spec.VPC.ID == "" { | ||
c.Spec.VPC.ID = *subnet.VpcId |
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.
Also need to get the CIDR for the VPC (as DNS IP depends on this), and we already have them for each of the subnets too (so might as well set them here).
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 looks good to be. I wonder if we need to think about refactoring (in general) in the future to start reducing the size of functions to make it cleaner and less complex.
Yeah, but I based on #306 there is still plenty of opportunities in this
particular area.
Per my comment above, there is a bug that needs to be addressed, and looks
like I will have to address #293 along the way also. This is fairly
trivial, but it does imply we might have to add mocks for a few somewhat
incidental EC2 API calls.
Having said that, maybe a good idea to go with a follow-up PR rather then
jamming everything into this one.
…On Wed, 7 Nov 2018, 9:15 am Richard Case, ***@***.***> wrote:
***@***.**** approved this pull request.
This looks good to be. I wonder if we need to think about refactoring (in
general) in the future to start reducing the size of functions to make it
cleaner and less complex.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#305 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPWS-oqJIL8OXWwJkp0LBxPnKniXs4Aks5usqTIgaJpZM4YQwCl>
.
|
I'd agree, generally a good idea. |
Description
This should sufficient to close #42 . As discussed in #303, there will be more logical features to add, but this should enable most folks.
This adds
--vpc-{private,public}-subnets
flags. It's entirely up to the user which ones they specify as private or public. This is very clearly defined in #303, but we need to come up with a concise statement to put in the docs. We also have a waning message now, to make sure we don't get too many bug reports because of bad VPC configurations, but we still need to make it crystal clear in the docs.Checklist
make build
)make test
)