mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 23:59:27 -05:00
feat(route53): resolve private hosted zone records from cluster containers (#4353)
Implement DnsRecordSource SPI via Route53DnsRecordSource to decouple Route 53 resolution from EmbeddedDnsServer. Add DnsLookupHelper in core.common.dns for external IPv4 resolution via upstream forwarders with system fallback, shared by Route53DnsRecordSource for CNAME and ALIAS chasing. Discover private hosted zones via Route53Service and support in-zone chasing, built-in Floci suffixes, and EC2 internal names. Authoritatively resolve A records within private zones to prevent upstream query leakage. Wire EKS cluster containers to embedded DNS via specBuilder.withEmbeddedDns().
This commit is contained in:
1 parent
84363f9570
commit
4032efd9c7
15 files changed
+1401
-52
No files matched your search
@@ -134,7 +134,7 @@ Floci supports the EKS cluster addon management plane for AWS SDKs and Terraform
|
||||
|
||||
### Supported operations
|
||||
|
||||
- **Creation**: `CreateAddon` creates an addon on an ACTIVE cluster. Supported addons include `vpc-cni`, `coredns`, `kube-proxy`, `eks-pod-identity-agent`, and `aws-ebs-csi-driver`. If `addonVersion` is omitted, the default version compatible with the cluster Kubernetes version is resolved automatically. Referenced `serviceAccountRoleArn` must exist in IAM. Idempotency is supported via `clientRequestToken`.
|
||||
- **Creation**: `CreateAddon` creates an addon on an ACTIVE cluster. Supported addons include `vpc-cni`, `coredns`, `kube-proxy`, and `eks-pod-identity-agent`. If `addonVersion` is omitted, the default version compatible with the cluster Kubernetes version is resolved automatically. Referenced `serviceAccountRoleArn` must exist in IAM. Idempotency is supported via `clientRequestToken`.
|
||||
- **Retrieval**: `DescribeAddon` returns the complete addon resource shape, including ARN, cluster name, version, status (`ACTIVE`), health issues, tags, service account role ARN, configuration values, pod identity associations, owner, and publisher.
|
||||
- **Listing**: `ListAddons` lists installed addon names with pagination (`maxResults` and `nextToken`).
|
||||
- **Updating**: `UpdateAddon` updates the addon version, configuration values, service account role ARN, or resolve-conflicts strategy. It returns an `Update` tracking object and updates the addon metadata.
|
||||
@@ -144,7 +144,7 @@ Floci supports the EKS cluster addon management plane for AWS SDKs and Terraform
|
||||
|
||||
### Metadata recording only
|
||||
|
||||
Addons in Floci are recorded metadata only. Creating or updating an addon does not install or reconcile Kubernetes DaemonSets, Deployments, or custom resources inside the cluster container. In particular, creating the EBS CSI addon records metadata and installs no driver, so a cluster needs the driver installed separately for storage to work.
|
||||
Addons in Floci are recorded metadata only. Creating or updating an addon does not install or reconcile Kubernetes DaemonSets, Deployments, or custom resources inside the cluster container.
|
||||
|
||||
## Cluster security group
|
||||
|
||||
@@ -407,6 +407,7 @@ The derived availability zone and instance ID match the synthetic EC2 node insta
|
||||
| `FLOCI_SERVICES_EKS_IRSA_SIGNING_KEY` | `true` | Pass the cluster OIDC signing key to k3s so in-cluster projected service account tokens can assume IAM roles via Floci STS |
|
||||
| `FLOCI_SERVICES_EKS_POD_IDENTITY_WEBHOOK` | `true` | Register a mutating admission webhook that injects pod identity credentials. Needs `FLOCI_TLS_ENABLED=true` |
|
||||
| `FLOCI_SERVICES_EKS_IMDS` | `false` | Enable link-local IMDS (`169.254.169.254`) proxy in cluster containers |
|
||||
| `FLOCI_SERVICES_EKS_EMBEDDED_DNS` | `true` | Inject Floci's embedded DNS server into cluster containers for Route 53 private hosted zones and internal name resolution |
|
||||
|
||||
### Kubernetes versions and network configuration
|
||||
|
||||
@@ -480,6 +481,10 @@ Requirements and limits:
|
||||
docker restart floci-eks-<cluster>
|
||||
```
|
||||
|
||||
### DNS resolution and Route 53 private hosted zones
|
||||
|
||||
By default, Floci injects its embedded DNS server into each cluster container (`FLOCI_SERVICES_EKS_EMBEDDED_DNS=true`). Cluster containers and CoreDNS forward to Floci's embedded resolver on port 53, enabling resolution of Route 53 private hosted zone records, internal hostnames, and records managed by `external-dns`. Set `FLOCI_SERVICES_EKS_EMBEDDED_DNS=false` to use standard Docker network DNS instead.
|
||||
|
||||
### Mock mode (CI / tests)
|
||||
|
||||
Use `FLOCI_SERVICES_EKS_MOCK=true` when you only need the API shape:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Route53
|
||||
|
||||
Route53 management-plane emulation. Supports hosted zones, resource record sets, health checks, change tracking, and tagging. Actual DNS resolution is not provided — this is a management-plane-only implementation.
|
||||
Route53 emulation supporting hosted zones, resource record sets, health checks, change tracking, and tagging. Private hosted zones provide embedded DNS resolution for cluster containers such as EKS and workloads wired to Floci's embedded DNS server.
|
||||
|
||||
## Supported Operations
|
||||
|
||||
@@ -54,6 +54,15 @@ Route53 management-plane emulation. Supports hosted zones, resource record sets,
|
||||
- Private hosted zones support up to 300 VPC associations and up to 1000 outstanding cross-account VPC association authorizations, matching the documented Route 53 default quotas.
|
||||
- Set `FLOCI_SERVICES_ROUTE53_VPC_ASSOCIATION_CONTROL_PLANE_DELAY_MS` above `0` to emulate a short in-flight control-plane window for retry testing. During that window, a subsequent `AssociateVPCWithHostedZone` for the same hosted zone returns `PriorRequestNotComplete`; overlapping create/delete authorization requests return `ConcurrentModification`. These are the retryable overlap errors documented by Route 53 for those operations.
|
||||
|
||||
## Private Hosted Zone DNS Resolution
|
||||
|
||||
Floci resolves private hosted zone DNS records directly through its embedded DNS server on port 53. Cluster containers (such as EKS k3s containers) and workloads wired to embedded DNS automatically query Floci as their primary resolver.
|
||||
|
||||
- **Record Types**: Resolves IPv4 `A` records (including `CNAME` and `ALIAS` target chasing across private zones, EC2 internal names, and external hostnames). When a private CNAME targets a public hostname, Floci resolves the target addresses off the event loop so container stub resolvers succeed. Multiple values are returned as separate answers.
|
||||
- **Zone Visibility and Fallthrough**: Only private hosted zones (created with a VPC association) are answered by Floci's embedded Route 53 resolver. Public zones and external domains fall through to upstream forwarders. Because the standard DNS wire protocol carries no caller VPC identifier, Floci resolves across private zones without filtering by account or VPC ID.
|
||||
- **Zero-Restart Propagation**: Record changes via `ChangeResourceRecordSets` take effect immediately without restarts.
|
||||
- **Kubernetes and external-dns Compatibility**: In-cluster controllers like `external-dns` provisioning Route 53 private records for Services or Ingresses are immediately resolvable.
|
||||
|
||||
## Default Nameservers
|
||||
|
||||
New zones use these nameservers (configurable via `floci.services.route53.*`):
|
||||
@@ -151,4 +160,4 @@ aws route53 delete-hosted-zone --id Z1PA6795UKMFR9
|
||||
- Query logging configs
|
||||
- DNSSEC (key signing keys, enabling/disabling)
|
||||
- `TestDNSAnswer`
|
||||
- Actual DNS resolution
|
||||
- Public hosted zone authoritative DNS serving (queries for public zones fall through to upstream forwarders)
|
||||
Reference in new issue
Block a user