Skip to content

fix(cni): skip capture for pods the agent reports unmanaged (RESULT_IGNORED) - #484

Merged
bpalermo merged 1 commit into
mainfrom
fix/cni-honor-managed-label
Jul 6, 2026
Merged

bpalermo merged 1 commit into
mainfrom
fix/cni-honor-managed-label

Conversation

@bpalermo

@bpalermo bpalermo commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Structural fix for the edge blackhole (#480 was a per-pod band-aid). The CNI can't see the aether.io/managed label (CRI passes annotations, not labels), so a managed=false pod in a non-ignored namespace got redirect-all capture with no listener → egress blackholed. Now the agent (the label authority) returns RESULT_IGNORED; CmdAdd registers first and installs capture only for managed pods — CNI+agent agree by construction. Reorder is safe (readiness probe hits the directly-bound listener, not the redirect). Unit+integration tests updated.

…GNORED)

Structural fix for the edge blackhole (#480 was a per-pod band-aid): the CNI
plugin gates capture by NAMESPACE and reads only pod ANNOTATIONS via CRI — it
cannot see the aether.io/managed LABEL. So a managed=false pod in a non-ignored
namespace got redirect-all capture installed by the CNI while the agent (which
DOES see the label, via the API) generated no listener → egress blackholed to a
dead capture port. Any such pod hit this, not just the edge.

Make the agent the single authority: AddPod returns RESULT_IGNORED (new enum
value) for an unmanaged pod. CmdAdd now REGISTERS with the agent FIRST, and only
installs capture (scoped redirect, redirect-all, mesh-DNS) when the agent did not
ignore the pod — CNI and agent agree by construction. Reordering is safe: the
readiness probe targets the directly-bound outbound listener (127.0.0.1:18081),
not the redirect path, so it doesn't need the iptables; and the netns pin still
precedes registration.

The edge's explicit capture.aether.io/redirect-all=false annotation (#480) stays
as harmless defense-in-depth.

Tests: AddPod ignorable → RESULT_IGNORED (unit + integration); sendAddPod returns
the ignored flag.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant