mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 23:59:27 -05:00
With floci.services.rds.endpoints-in-vpc on, a DB proxy's default endpoint is served at its own address in the first of its subnets, under the name RDS gives it, <proxy>.proxy-<identifier>.<region>.rds.<dnsSuffix>, and each endpoint added to it at its own address in its own subnets, under <endpoint>.endpoint.proxy-<identifier>. Each serves the engine family's port, as "all proxies listen on port 5432 for PostgreSQL" and "on port 3306 for MySQL", so two proxies can both serve 5432; a relay forwards to the proxy's listener, which takes a free port in the proxy range. DescribeDBProxies and DescribeDBProxyEndpoints report the names, which Floci's DNS server answers as soon as the proxy or endpoint exists. An IAM token generated for any of a proxy's endpoints is good at the proxy, and the proxies' certificate covers the names. A renamed endpoint answers by its new name. Deleting an endpoint or the proxy removes its names and then its relays; one Docker does not confirm removed stays tracked, keeping its port from other databases, until Floci stops or restarts. A restart serves them again at the addresses they had, and moves them in or out of the VPC as the setting now says. RdsEndpointAddresses gains a relay and name API for endpoints that are not an instance's, with a best-effort discard, and reaches() replaces namesCluster() for both clusters and proxies. Closes #6273