Skip to content

egressgw: simplify error handling when selecting egressIP #38995

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

julianwiedmann
Copy link
Member

@julianwiedmann julianwiedmann commented Apr 17, 2025

Instead of setting `EgressIPNotFoundIPv*` from every error path, just set
it by default. And later override it with the actual egressIP, once we
were able to derive the gateway node's network configuration.

This helps to ensure that if we were not able to derive a network config
on the gateway node, the policy entry always ends up with the
EgressIPNotFoundIPv* value - and thus explicitly drops any EGW traffic that
is forwarded to the gateway.

@julianwiedmann julianwiedmann added kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact. feature/egress-gateway Impacts the egress IP gateway feature. labels Apr 17, 2025
@julianwiedmann julianwiedmann requested a review from a team as a code owner April 17, 2025 06:20
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann marked this pull request as draft April 18, 2025 04:15
auto-merge was automatically disabled April 18, 2025 04:15

Pull request was converted to draft

@julianwiedmann julianwiedmann force-pushed the 1.18-egressgw-egressip branch from d556140 to 11bf0d7 Compare May 9, 2025 12:20
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann marked this pull request as ready for review May 9, 2025 13:19
@julianwiedmann julianwiedmann enabled auto-merge May 9, 2025 13:19
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.

LGTM

Instead of setting `EgressIPNotFoundIPv*` from every error path, just set
it by default. And later override it with the actual egressIP, once we
were able to derive the gateway node's network configuration.

This helps to ensure that if we were not able to derive a network config
on the gateway node, the policy entry always ends up with the
EgressIPNotFoundIPv* value - and thus explicitly drops any EGW traffic that
is forwarded to the gateway.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann force-pushed the 1.18-egressgw-egressip branch from 11bf0d7 to 5b2f6d5 Compare May 20, 2025 04:40
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann added this pull request to the merge queue May 20, 2025
@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 May 20, 2025
Merged via the queue into cilium:main with commit 7823a5f May 20, 2025
73 of 85 checks passed
@julianwiedmann julianwiedmann deleted the 1.18-egressgw-egressip branch May 20, 2025 06:22
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. kind/cleanup This includes no functional changes. 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.

2 participants