Open kevinmcconnell opened 2 days ago
Not sure if we can yet do the following. Maybe with multiple instances of kaml-proxy
pointing to the same service?
Preferably, each host would be able to acquire an ssl cert for it's domain (and not just wildcard certs for subdomains). For example:
kamal-proxy deploy myapp --target=web-1:3000 --hosts="example.com,foo.com" --tls
example.com
should route to web-1:3000
with a valid example.com cert.foo.com
should route to web-1:3000
with a valid foo.com cert.@nickpoorman That's what this feature will allow, yes! (Sorry, I see now my example command in the description was wrong before, which made this quite confusing! Fixed now. Thanks for drawing attention to that.)
This will still be using a single instance of kamal-proxy
, but it gives it the ability to associate multiple hosts (and their certs) with a single service & target, exactly as you've described there.
This feature is still in progress, but I should have something ready to try soon.
We should allow multiple hosts to map to a single service. For example:
This needs to be supported for the routing, and for the auto-TLS support. For the former, we can restructure the service map into two collections: the "main" service map, mapping name->service, and a "routing" map, mapping hostname->service.
For the latter, we'll include all the hostnames in the certificate management for that service.