-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support PacketCapture for arbitrary source / destination #6976
Comments
I can see the following things that will need to be done in the PR that would fix this:
I realize this isn’t an ideal "first issue," but I believe I can probably take a good crack at with my present skill set. The packet capture logic itself is relatively contained compared to the rest of the codebase, so it feels manageable. I can’t promise perfection 😛, but I’ll definitely give it a good shot. |
Just to know that we are on the same page:
Currently though, (paraphrasing form the discussion in #6863 ) Edit: I realized we expect atleast one of the source/destination to be a pod. But we always expect both the destination and source to be present.
|
One area that isn't entirely clear to me is handling cases where the source or destination is an external IP. Currently, PacketCapture assumes that at least one of the source or destination is a pod. However, with the proposed changes:
A particular concern is how
Of these, the 2nd idea seems a good fit IMO. What are your thoughts on this @antoninbas? Apologies upfront, in case I am missing something. |
As a side note, I may not be super active this coming week. But I will try to keep up with your comments and make a PR whenever I get the time. |
@mviswanathsai thanks for your enthusiasm. Please do feel free to take a stab at this issue. A few key points based on your questions / comments above:
There is no need for CEL here. The current restriction just needs to be relaxed. I even shared a link to the relevant section of the OpenAPI schema in the CRD definition.
Correct, and the destination has to be a Pod.
Same. This is correct, and the source has to be a Pod.
Yes, and that will remain the case even after this change.
While #6863 is probably needed to clarify this, there is no plan to have more than one capture point for a PacketCapture. If
I think this concern is no longer relevant once you consider that there is only ever one capture point (source or destination). The key point of this issue is to relax the current restriction, which implies:
|
… or dest pod traffic Signed-off-by: ifrah-ashraf <[email protected]>
Hi @antoninbas, Could you please review the latest changes for this issue. I’ve addressed the validation updates and made the necessary modifications to ensure correct packet capture behavior. Thanks ! |
… or dest pod traffic Signed-off-by: ifrah-ashraf <[email protected]>
Describe the problem/challenge you have
At the moment the PacketCapture CR requires specifying both a
source
and adestination
:antrea/build/charts/antrea/crds/packetcapture.yaml
Lines 47 to 53 in a51535a
The limitation doesn't make sense to me. We should be able to capture all traffic egressing from a given Pod, or all traffic ingressing into a given Pod. Note that the real requirement here is that at least one of
source.pod
anddestination.pod
must be provided, which I believe is already enforced today:antrea/build/charts/antrea/crds/packetcapture.yaml
Lines 54 to 60 in a51535a
Describe the solution you'd like
It should be possible to omit the
source
field whendestination.pod
is present:Likewise, it should be possible to omit the
destination
field whensource.pod
is present:Anything else you would like to add?
Note that there will be some "interaction" with #6863.
When
source
is omitted, the only possible capture point is the destination Pod. Whendestination
is omitted, the only possible capture point is the source Pod.The text was updated successfully, but these errors were encountered: