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

k8sprocessor: use src IP for further searching if the dst IP is a loopback address #251

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

dxsup
Copy link
Member

@dxsup dxsup commented Jun 16, 2022

Description

Use src IP for further searching if the dst IP is a loopback address.

Motivation and Context

I found there are some cases where the containers use the loopback address to send requests to the containers in the same pod, such as node-exporter. In these cases, the destination IP is 127.0.0.1 with which we can't find the pod information, but the source IP is correct which can be used to search for the destination pod.

…pback address

Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
@dxsup dxsup requested a review from NeJan2020 June 16, 2022 01:46
Copy link
Collaborator

@NeJan2020 NeJan2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will not affect the original data(the 'dstIp' field) but simply uses reasoning to determine the true dstPod information. We need to modify some of the existing logic and maintain this principle in the future, that is any reasoning should not change the origin data.

@dxsup dxsup merged commit 76c4a76 into KindlingProject:main Jun 16, 2022
@dxsup dxsup deleted the fix/loopback-to-real-pod branch June 16, 2022 02:10
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.

2 participants