-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
DNS Providers + TLS Certificates #84
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for DNS Providers, beginning with Amazon Route53. Having a hosted zone available for your domain, AssemblyLift will generate DNS records for your services. Additionally TLS certificates will be provisioned for each service; on AWS Lambda these are ACM certificates, and on K8S cert-manager is installed and certificates are obtained from Let's Encrypt.
DNS Providers are declared in the
domains
array inassemblylift.toml
:To use a domain with a service, declare it in the
api
table in theservice.toml
:DNS entries are created for each service which declares a domain name. Entries are A Records named
<service-name>.<project-name>
which point to the service. For Lambda-based services, these are aliases to an API Gateway endpoint.For example a project named
petshop
and a service namedpos
you might invoke a function mounted at/checkout
with:curl https://pos.petshop.mydomain.com/checkout
Route53
The Route53 (R53) provider requires that the Hosted Zone for the domain name already exists in the region specified in
provider.options
.When using R53 with the Kubernetes provider, cert-manager is deployed to provision TLS certificates from Let's Encrypt and keep them up-to-date. This requires cert-manager to have access to your R53 Hosted Zone in order to create the verification DNS entries. These credentials are expected to be in a generic Kubernetes secret named
iam-cert-manager-r53
in thecert-manager
namespace.kubectl create secret generic iam-cert-manager-r53 -n cert-manager --from-literal=aws_region=<region> --from-literal=aws_access_key_id=<id> --from-literal=aws_secret_access_key=<key>
Let's Encrypt
This build will only provision a self-signed cert from the staging API and is not suitable for production. Toggling a production cert will come in another release :)