Repository navigation
Target the backendRef port in HTTPRoute proxy services - #470
Merged
mlsmaycon merged 2 commits intoOct 23, 2026
Conversation
The HTTPRoute controller built proxy targets without a port, so NetBird used port 0 and the proxy could only reach a Service by luck, when it listened on the default HTTP port. Each backendRef now becomes a target on the Service port it names, and targets follow the route's backend order instead of map iteration order.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## work/vibrant-goodall-ufrnk8-route-gateway-watch #470 +/- ##
===================================================================================
+ Coverage 44.93% 45.01% +0.07%
===================================================================================
Files 28 28
Lines 3843 3852 +9
===================================================================================
+ Hits 1727 1734 +7
- Misses 1868 1869 +1
- Partials 248 249 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…e-gateway-watch' into work/vibrant-goodall-ufrnk8-httproute-port
mlsmaycon
marked this pull request as ready for review
October 23, 2026 21:41
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
mlsmaycon
added this pull request to stack #472
October 23, 2026 21:43
braginini
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #313. Stacked on #469;
TestHTTPRouteBackendPortin #465 reproduces this.The HTTPRoute controller built its reverse-proxy targets without a port, so the target came back with port 0 and the proxy only reached a Service that happened to listen on the default HTTP port. Each backendRef now becomes a target on the Service port it names. Targets also follow the route's backend order instead of map iteration order, so the request the controller sends no longer changes between reconciles of a route with several backends.
The controller spec moves its backend to port 8080 and checks the target's port; it fails with port 0 without this change. The e2e comment that explained port 80 as a workaround for this now says why the default backends keep it.
#335 attempted this together with path support and was closed unmerged; this change keeps to the port.
Summary by CodeRabbit