Skip to content
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

To support Egress based path in Traceflow Output #6099

Open
rajnkamr opened this issue Mar 11, 2024 · 5 comments
Open

To support Egress based path in Traceflow Output #6099

rajnkamr opened this issue Mar 11, 2024 · 5 comments
Assignees
Labels
area/ops/traceflow Issues or PRs related to the Traceflow feature area/transit/egress Issues or PRs related to Egress (SNAT for traffic egressing the cluster). kind/design Categorizes issue or PR as related to design.

Comments

@rajnkamr
Copy link
Contributor

rajnkamr commented Mar 11, 2024

Describe what you are trying to solve

Egress Node IP can identify the egress node in traceflow observation, egress ip could vary based on whether it is static/allocated from IPPool.
Egress node ip is the management ip of the cluster/node. When there is only one interface on device, Egress Node IP is both the management and transport interface ip.
To provide complete traceflow path we need to add src pod ip
Describe the solution you have in mind

Add src pod ip and node's packet path
Describe how your solution impacts user flows

N/A
Describe the main design/architecture of your solution

Display Egress Node IP in traceflow output
Alternative solutions that you considered

Test plan

Additional context

To provide a live traffic interface detection tool for Antrea Egress Node

@rajnkamr rajnkamr added kind/design Categorizes issue or PR as related to design. area/ops/traceflow Issues or PRs related to the Traceflow feature area/transit/egress Issues or PRs related to Egress (SNAT for traffic egressing the cluster). labels Mar 11, 2024
@rajnkamr rajnkamr added this to the Antrea v2.0 release milestone Mar 11, 2024
@tnqn
Copy link
Member

tnqn commented Mar 18, 2024

Before this is implemented, can you share the motivation of the change? I remember we have added Egress Node name to the observation, is it really useful to have a redundant information which can be got by querying the Node API and IMO the Node IP doesn't seem helpful to analyze the traceflow result.

Same for Pod IP: users need to provide Pod name or Pod IP to trigger a Traceflow, I'm not sure how returning the Pod IP in status helps here.

@rajnkamr
Copy link
Contributor Author

In case of static egress ip, egress ip and egress node ip are same, however when ip pool is used, egress ip and egress node ip could be different. It is better to support having egress node ip field in traceflow egress observation for user clarity.

Usually tracflow user preferably uses pod name, main motivation is driven from req where pod ip should be displayed in status to let software managing antrea to have src ip info before SNAT. (Egress)

Atish-iaf added a commit to Atish-iaf/antrea that referenced this issue Mar 20, 2024
- Add "EgressNodeIP" and "SrcPodIP" fields in Traceflow observations.

- Add "EgressNode" field in observations from Egress Node as well when
  Egress Node is different from source Node. Previously, "EgressNode" field
  was available only in observations from source Node.

Closes antrea-io#6099

Signed-off-by: Kumar Atish <kumar.atish@broadcom.com>
Atish-iaf added a commit to Atish-iaf/antrea that referenced this issue Mar 20, 2024
- Add "EgressNodeIP" and "SrcPodIP" fields in Traceflow observations.

- Add "EgressNode" field in observations from Egress Node as well when
  Egress Node is different from source Node. Previously, "EgressNode" field
  was available only in observations from source Node.

Closes antrea-io#6099

Signed-off-by: Kumar Atish <kumar.atish@broadcom.com>
@tnqn
Copy link
Member

tnqn commented Mar 21, 2024

In case of static egress ip, egress ip and egress node ip are same, however when ip pool is used, egress ip and egress node ip could be different. It is better to support having egress node ip field in traceflow egress observation for user clarity.

Usually tracflow user preferably uses pod name, main motivation is driven from req where pod ip should be displayed in status to let software managing antrea to have src ip info before SNAT. (Egress)

Got it, thanks.

Atish-iaf added a commit to Atish-iaf/antrea that referenced this issue Mar 27, 2024
- Add "EgressNodeIP" field in Traceflow observations.

- Add "EgressNode" field in observations from Egress Node as well when
  Egress Node is different from source Node. Previously, "EgressNode" field
  was available only in observations from source Node.

For antrea-io#6099

Signed-off-by: Kumar Atish <kumar.atish@broadcom.com>
@rajnkamr
Copy link
Contributor Author

rajnkamr commented Apr 10, 2024

Usually if one wish to communicate from the k8s Pods to an external Service outside the Cluster, user will have to allow traffic from all the Cluster Node IPs, providing no node affinityrules in place. It may potentially create security concerns with externally configured ACLs.

SNAT external IP Pool / Static SNAT IP are assigned for the outgoing network traffic from the Pods. Antrea Egress feature selectively assign the SNAT IP based on Pod Labels / Namespace Labels or both. Externalippoolresource has specification field to define the Nodes from which the SNATed traffic originates.

Even though the src pod ip can keep on changing, however src pod ip can help to provide complete packet path during traceflow

@rajnkamr rajnkamr changed the title To support Egress Node IP and Pod IP in Traceflow Output To support Egress Node IP Traceflow Output Apr 10, 2024
Atish-iaf added a commit to Atish-iaf/antrea that referenced this issue Apr 17, 2024
- Add "EgressNodeIP" field in Traceflow observations.

- Add "EgressNode" field in observations from Egress Node as well when
  Egress Node is different from source Node. Previously, "EgressNode" field
  was available only in observations from source Node.

Fixes antrea-io#6099

Signed-off-by: Kumar Atish <kumar.atish@broadcom.com>
@rajnkamr rajnkamr changed the title To support Egress Node IP Traceflow Output To support Egress based path in Traceflow Output Apr 22, 2024
@antoninbas
Copy link
Contributor

The source Pod IP has been added to the Traceflow observations in #6247.
The other item is tracked separately in #6273.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ops/traceflow Issues or PRs related to the Traceflow feature area/transit/egress Issues or PRs related to Egress (SNAT for traffic egressing the cluster). kind/design Categorizes issue or PR as related to design.
Projects
None yet
Development

No branches or pull requests

5 participants