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

fix: add secondary IPs for enrichment #272

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

FZhg
Copy link
Contributor

@FZhg FZhg commented Apr 16, 2024

Description

Please provide a brief description of the changes made in this pull request.

Related Issue

Fixes #224

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

image

Additional Notes

Both the previous implementation and this PR don't clear stale IP-endpoint bindings immediately from the ipToEpKey Map.
E.g. When endpoint A changes from IP address "1.1.1.1" to "2.2.2.2", the stale binding between the IP address "1.1.1.1" and endpoint A is still in the ipToEpKey map until the IP address "1.1.1.1" gets reassigned to another pod.
However, this shouldn't be a problem. The DNS is supposed to provide up-to-date IP addresses for the sender and receiver so that any flow event will always contain the latest IP addresses.

@FZhg FZhg requested a review from a team as a code owner April 16, 2024 12:42
@FZhg FZhg requested review from nddq and snguyen64 April 16, 2024 12:42
@FZhg
Copy link
Contributor Author

FZhg commented Apr 17, 2024

@rbtr Hi Evan, Could you give me another approval for running the CI tests? Thanks!

@rbtr
Copy link
Collaborator

rbtr commented Apr 17, 2024

hey @FZhg it looks like your branch has conflicts, can you resolve them? Please update it against latest main also, your diff is showing other changes than just yours and I think a rebase (git fetch --all && git rebase upstream/main or equivalent based on your repository config) would resolve this.

@FZhg
Copy link
Contributor Author

FZhg commented Apr 18, 2024

hey @FZhg it looks like your branch has conflicts, can you resolve them? Please update it against latest main also, your diff is showing other changes than just yours and I think a rebase (git fetch --all && git rebase upstream/main or equivalent based on your repository config) would resolve this.

Thanks for your help! Problem solved.

Copy link
Collaborator

@rbtr rbtr left a comment

Choose a reason for hiding this comment

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

some initial feedback on the typed errors introduced here

pkg/common/endpoint.go Outdated Show resolved Hide resolved
pkg/common/endpoint.go Outdated Show resolved Hide resolved
pkg/common/endpoint.go Outdated Show resolved Hide resolved
@FZhg FZhg force-pushed the fix/sencondary-ips-enrichment branch from b5d2212 to c882308 Compare April 19, 2024 13:42
Copy link
Contributor

@nddq nddq left a comment

Choose a reason for hiding this comment

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

lgtm, thank!

@snguyen64
Copy link
Contributor

lgmt, thank you for your contribution

@nddq nddq added this pull request to the merge queue Apr 24, 2024
Merged via the queue into microsoft:main with commit 0f56953 Apr 24, 2024
21 checks passed
nddq pushed a commit that referenced this pull request May 6, 2024
# Description

Please provide a brief description of the changes made in this pull
request.

## Related Issue
Fixes #224 

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [x] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

![image](https://github.com/microsoft/retina/assets/22489650/9a38aae1-ecd9-49fe-bfa8-4f5898aadd1f)



## Additional Notes
Both the previous implementation and this PR don't clear stale
IP-endpoint bindings immediately from the ipToEpKey Map.
E.g. When endpoint A changes from IP address "1.1.1.1" to "2.2.2.2", the
stale binding between the IP address "1.1.1.1" and endpoint A is still
in the ipToEpKey map until the IP address "1.1.1.1" gets reassigned to
another pod.
However, this shouldn't be a problem. The DNS is supposed to provide
up-to-date IP addresses for the sender and receiver so that any flow
event will always contain the latest IP addresses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Enrich flows based on non-primary Pod IPs
4 participants