Skip to content

Commit 2a21292

Browse files
committed
atenet/router: bind the admin socket and Service dual-stack
The Envoy admin socket bound 0.0.0.0, and the atenet-router Service carried no ipFamilyPolicy -- which the API server defaults to SingleStack, one IPv4 ClusterIP and nothing else. Between them the router had no IPv6 address to answer on. The socket now binds "::" with ipv4_compat, one socket for both families, and the Service asks for PreferDualStack. bootstrap.v3.Admin takes a single address and has no additional_addresses, so the ingress listeners' shape is not available here; ipv4_compat is what makes the one socket serve both families. It is load-bearing: dataplane.go health-checks the admin listener over http://127.0.0.1:9901/ready, so a bare "::" would report the dataplane component of /statusz unhealthy. Prefer, not Require, keeps the Service valid on a single-stack cluster; spec.ipFamilies is left alone because the primary family is immutable and the API server appends the secondary itself.
1 parent 501991d commit 2a21292

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎cmd/atenet/internal/router/dataplane.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ type dataplaneHealthCheck struct {
3636
// untouched, so atunnel always authorizes by the actor's own DNS name --
3737
// ingress.New needs no per-dataplane routing mode.
3838

39+
// healthCheck dials IPv4 loopback, which is why the admin socket in
40+
// manifests/ate-install/atenet-router.yaml needs ipv4_compat.
3941
func (r atenetRouter) healthCheck() dataplaneHealthCheck {
4042
switch r {
4143
case atenetRouterEnvoy:

‎manifests/ate-install/atenet-router.yaml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ data:
8686
admin:
8787
address:
8888
socket_address:
89-
address: 0.0.0.0
89+
# ipv4_compat is load-bearing: dataplane.go probes /ready over IPv4 loopback.
90+
address: "::"
91+
ipv4_compat: true
9092
port_value: 9901
9193
9294
node:
@@ -354,6 +356,8 @@ metadata:
354356
namespace: ate-system
355357
spec:
356358
type: ClusterIP
359+
# Prefer, not Require: Require fails Service creation on a single-stack cluster.
360+
ipFamilyPolicy: PreferDualStack
357361
selector:
358362
app: atenet-router
359363
ports:

0 commit comments

Comments
 (0)