-
Notifications
You must be signed in to change notification settings - Fork 1.5k
BYO VPC Validation #2493
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
BYO VPC Validation #2493
Conversation
3dcf74b to
6953ab7
Compare
b7ba2ff to
8b26c38
Compare
|
/test e2e-gcp |
8b26c38 to
59db9a4
Compare
|
/test e2e-gcp |
486b6ca to
13a7128
Compare
|
/test e2e-gcp |
1 similar comment
|
/test e2e-gcp |
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 it seems like this function should be called validatePlatform as it does validation for VPC + subnets.
maybe validatePlatform(client API, platform *types.GCPPlatform, networking *types.Networking, path *field.Path) field.ErrorList
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 agree we should change the name from VPC, but I imagined the top level validate function to be the equivalent of validatePlatform. If there were further platform-specific data that needed to be added they would not be added here. Perhaps validateNetwork or validateNetworks?
c431991 to
72695ae
Compare
2624fe0 to
a7bcdc0
Compare
This creates an interface and a wrapper for calls to the GCP API. This initial implementation has a bare-bones method for retrieiving VPC networks. This will be important for testing so that we can stub out calls to the GCP API.
a7bcdc0 to
6f12422
Compare
6f12422 to
40d19fb
Compare
|
/test e2e-gcp |
Adds logic to check Google API to make sure user-provided VPC information is valid. Checks that the VPC belongs to project, subnets belong to VPC, and subnets are in the correct region.
40d19fb to
c81f353
Compare
This generates mocks for the GCP client API interface and creates tests for the BYO VPC validation use case.
Checks to make sure both subnets are required in install config if a network is specified.
Rewrites existing DNS code for getting basedomains and dns public zone to utliize new gcp client. Regenerate mock with addition to interface.
c81f353 to
6cf9eda
Compare
|
/test e2e-gcp |
|
I added 6cf9eda to incorporate DNS to use the client. I think it seems like a natural fit, but not sure if we want to include it. I started to write tests but the scenarios seem pretty artificial, so I think it is ok without them. |
|
/retest |
|
/approve |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, patrickdillon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Jira: CORS-1216
This PR: