Skip to content
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

Merged
merged 4 commits into from Nov 7, 2018

Conversation

@errordeveloper
Copy link
Member

commented Nov 6, 2018

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

  • Code compiles correctly (i.e make build)
  • All tests passing (i.e. make test)
  • Added/modified documentation as required (such as the README)

@errordeveloper errordeveloper requested a review from richardcase Nov 6, 2018

@errordeveloper errordeveloper force-pushed the subnets branch 2 times, most recently from 9632225 to 3e4c6d6 Nov 6, 2018

@errordeveloper errordeveloper requested a review from christopherhein Nov 6, 2018

Add `--vpc-{private,public}-subnets` flags
- refactor conditional logic for readability
- add more flag compatibility validation
- print warning to ensure that configuring the
  VPC and subnets is user's responsibility

for _, subnet := range output.Subnets {
if c.Spec.VPC.ID == "" {
c.Spec.VPC.ID = *subnet.VpcId

This comment has been minimized.

Copy link
@errordeveloper

errordeveloper Nov 7, 2018

Author Member

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).

@richardcase
Copy link
Collaborator

left a comment

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.

@errordeveloper

This comment has been minimized.

Copy link
Member Author

commented Nov 7, 2018

@errordeveloper errordeveloper changed the title WIP: Enable use of existing subnets Enable use of existing subnets Nov 7, 2018

@errordeveloper errordeveloper merged commit e3b8ecb into master Nov 7, 2018

3 checks passed

GolangCI No issues found!
Details
WIP Ready for review
Details
ci/circleci: make-eksctl-image Your tests passed on CircleCI!
Details

@errordeveloper errordeveloper deleted the subnets branch Nov 7, 2018

@richardcase

This comment has been minimized.

Copy link
Collaborator

commented Nov 7, 2018

Having said that, maybe a good idea to go with a follow-up PR rather then jamming everything into this one.

I'd agree, generally a good idea.

errordeveloper added a commit that referenced this pull request Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.