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

egressgw: Miscellaneous minor fixes to the manager #31869

Merged

Conversation

pippolo84
Copy link
Member

Couple of minor fixes to the egress gateway manager. Refer to the individual commit messages for further details.

@pippolo84 pippolo84 added release-note/misc This PR makes changes that have no direct user impact. feature/egress-gateway Impacts the egress IP gateway feature. labels Apr 9, 2024
@pippolo84 pippolo84 requested a review from a team as a code owner April 9, 2024 17:25
@pippolo84 pippolo84 requested a review from ysksuzuki April 9, 2024 17:25
@pippolo84

This comment was marked as outdated.

@pippolo84 pippolo84 force-pushed the pr/pippolo84/egress-gateway-minor-fixes branch from e778e0e to 2a1c56c Compare April 17, 2024 15:55
The egw manager relies on a wait group to wait for the termination of
the goroutine spawned in the start hook, but it misses the calls to its
Add and Done methods.

Add what is missing to properly use the wait group and be sure that the
event loop goroutine will be terminated when the manager is stopped.

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
removeUnusedEgressRules loops over egress policy BPF map looking for
entries to be cleaned up.  If the current entry is still valid, the loop
goes ahead to inspect the next one.

A previous refactoring removed the need for multiple nested loops. Since
now there is just a single one, a `continue` is enough and is more
readable than a labelled continue.

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
@pippolo84 pippolo84 force-pushed the pr/pippolo84/egress-gateway-minor-fixes branch from 2a1c56c to 764677e Compare April 17, 2024 15:56
@pippolo84
Copy link
Member Author

/test

Copy link
Member

@ysksuzuki ysksuzuki left a comment

Choose a reason for hiding this comment

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

Thanks!

@julianwiedmann julianwiedmann added this pull request to the merge queue Apr 18, 2024
Merged via the queue into cilium:main with commit b152367 Apr 18, 2024
62 checks passed
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/egress-gateway Impacts the egress IP gateway feature. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants