-
Notifications
You must be signed in to change notification settings - Fork 402
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
Feat: add HTTPRoute-rule name to envoy route metadata #4561
Conversation
Signed-off-by: Ido Itzkovich <[email protected]>
would this mean I can target a http route rule section with a securitypolicy?
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4561 +/- ##
=======================================
Coverage ? 65.58%
=======================================
Files ? 211
Lines ? 31951
Branches ? 0
=======================================
Hits ? 20955
Misses ? 9754
Partials ? 1242 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/retest |
internal/gatewayapi/route.go
Outdated
@@ -362,6 +362,10 @@ func (t *Translator) processHTTPRouteRule(httpRoute *HTTPRouteContext, ruleIdx i | |||
Name: irRouteName(httpRoute, ruleIdx, matchIdx), | |||
SessionPersistence: sessionPersistence, | |||
} | |||
irRoute.Metadata = buildRouteMetadata(httpRoute) | |||
if rule.Name != nil { | |||
irRoute.Metadata.SectionName = string(*rule.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see the SectionName
in the testdata outpout file. Did I miss anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I missed the scenario of matcher-less routes :p
Signed-off-by: Ido Itzkovich <[email protected]>
Signed-off-by: Ido Itzkovich <[email protected]>
Fixed the issue of routes with no matchers + added support for gRPC routes as well |
This PR adds route rule names to the Envoy route metadata (section-name) as described in #4551
This will allow various runtime flows (such as access logging) to have awareness of the matched route-rule.
Fixes #4551
Release Notes: No