Repository navigation
fix(cni): skip capture for pods the agent reports unmanaged (RESULT_IGNORED) - #484
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Structural fix for the edge blackhole (#480 was a per-pod band-aid). The CNI can't see the
aether.io/managedlabel (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) returnsRESULT_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.