Update Managed Routing Agent to discover NAT gateway Droplets
Matt Field
The latest Routing Agent release for DOKS has a single CR,
Route
, that requires specifying gateways by IP address. Given how Droplets can be destroyed, rotated etc, even with reserved IPs attached, it'd be incredibly useful to have the agent find Droplets via a discovery mechanism, similar to how it currently supports using node selectors to restrict settings a route to a subnet of K8s nodes. This could work via Droplet tags, for instance. I'd imagine something similar to the way Cilium handles gateway discovery for Egress Gateways via the
CiliumEgressGatewayPolicy
CR. Route
could look something like:apiVersion: networking.doks.digitalocean.com/v1alpha1
kind: Route
metadata:
name: egress-gateways
spec:
destinations:
- 0.0.0.0/0
gateways:
dropletSelector:
matchTags:
- egress-gateway