-
Notifications
You must be signed in to change notification settings - Fork 607
Support API Gateway #1108
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
Support API Gateway #1108
Conversation
…romAPIName funciton to operator
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 really good, nice job figuring out the AWS APIs / CLI!
I added some comments, and I also made some edits. Mostly they were minor edits or rearranging of code. Here are some of the things I changed:
- I replaced occurrences of e.g.
loadBalancerScheme.String() == "internet-facing"
withloadBalancerScheme == clusterconfig.InternetFacingLoadBalancerScheme
- In
create_gateway_integration.py
, I passedclient_elb
into the helper functions - You can ignore the diff in
install.sh
, since that was just minor formatting - I moved the code around in
lib/aws/apigateway.go
, it will probably be easier to look at the new file instead of looking at the diff. The main change is that I tried to make everything in that file not cortex-specific, since we try to keep cortex-specific code out of thelib
packages. There were some other more minor changes in this file. - I updated
operator/gateway.go
to use the updated functions fromlib/aws/apigateway.go
. This file will also be easier to see if you open the new version rather than comparing the diff. - In
operator/api.go
, I rearranged it so that it will still attempt to delete all resources even if API gateway deletion fails. I also updatedGetSpecForRunningAPI()
andgetAPIIDForRunningAPI()
to return nil/empty if the API is not running (rather than panic)
I didn't try running all of my changes, since I wanted to run them by you first; what do you think, does this all make sense?
Also, I noticed that you decided to query the API Gateway from AWS when necessary, rather than adding the API Gateway information to the config
package. Is there a reason you went with this approach instead of loading it in config.Init()
?
If you've setup API gateway and want to delete it, please follow these [instructions](../guides/api-gateway.md#cleanup). | ||
|
||
If you've configured HTTPS by specifying an SSL Certificate for a subdomain in your cluster configuration, you may wish to remove the SSL Certificate and Hosted Zone for the domain by following these [instructions](../guides/subdomain-https-setup.md#cleanup). | ||
If you've configured a custom domain for your APIs, you may wish to remove the SSL Certificate and Hosted Zone for the domain by following these [instructions](../guides/custom-domain.md#cleanup). |
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.
nit: you may wish to remove
-> you may remove
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! Thanks again for adding this!
closes #1077
checklist:
make test
andmake lint
summary.md
(view in gitbook after merging)