Skip to content

Commit 2549657

Browse files
committed
atenet/egress: bind the Envoy sockets and Service dual-stack
The gateway's admin and :443 sockets bound 0.0.0.0, so on an IPv6-primary cluster the kubelet probed the pod on its only address and atenet-egress crashlooped -- Envoy started fine and logged "admin address: 0.0.0.0:15000" -- while an actor's CONNECT had no v6 path in. Both sockets now bind "::" with ipv4_compat, and the Service asks for PreferDualStack so a dual-stack cluster hands out an IPv6 ClusterIP to reach them on. One socket here rather than the ingress listeners' pair: IPv4 peers then arrive as ::ffff: addresses, and nothing on this path reads the peer -- actor identity comes from the client certificate and the access log records the cert SAN. ipv4_compat also has to stay on the admin socket, because the ext-proc sidecar's drainer dials 127.0.0.1:15000 and envoydrain.go reads a refusal there as "Envoy already exited", skipping the drain silently. Last of three.
1 parent 2a21292 commit 2549657

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,15 @@ data:
3737
envoy.yaml: |
3838
admin:
3939
address:
40-
socket_address: { address: 0.0.0.0, port_value: 15000 }
40+
# ipv4_compat is load-bearing: see --envoy-admin-address below.
41+
socket_address: { address: "::", ipv4_compat: true, port_value: 15000 }
4142
static_resources:
4243
listeners:
4344
- name: egress
4445
address:
45-
socket_address: { address: 0.0.0.0, port_value: 443 }
46+
# ipv4_compat rather than a second socket: IPv4 peers arrive as
47+
# ::ffff: and nothing here reads the peer -- identity is the cert.
48+
socket_address: { address: "::", ipv4_compat: true, port_value: 443 }
4649
filter_chains:
4750
# Named so ext_proc can read it back as xds.filter_chain_name. Must
4851
# match EgressFilterChainName in
@@ -379,6 +382,8 @@ metadata:
379382
namespace: ate-system
380383
spec:
381384
type: ClusterIP
385+
# Prefer, not Require: Require fails Service creation on a single-stack cluster.
386+
ipFamilyPolicy: PreferDualStack
382387
selector:
383388
app: atenet-egress
384389
ports:

0 commit comments

Comments
 (0)