-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
refactor(policy): generalize route types in inbound index #12677
Closed
the-wondersmith
wants to merge
24
commits into
linkerd:main
from
the-wondersmith:policy-refactor-index-inbound-generalize-route-types
Closed
refactor(policy): generalize route types in inbound index #12677
the-wondersmith
wants to merge
24
commits into
linkerd:main
from
the-wondersmith:policy-refactor-index-inbound-generalize-route-types
Conversation
This file contains 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
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
…efactor-index-inbound-generalize-route-types Signed-off-by: Mark S <the@wondersmith.dev> # Conflicts: # policy-controller/grpc/src/inbound.rs # policy-controller/k8s/index/src/http_route.rs # policy-controller/k8s/index/src/inbound/index.rs # policy-controller/k8s/index/src/inbound/routes.rs # policy-controller/k8s/index/src/inbound/tests/authorization_policy.rs # policy-controller/k8s/index/src/outbound/index.rs # policy-controller/k8s/status/src/index.rs # policy-controller/k8s/status/src/resource_id.rs # policy-controller/k8s/status/src/tests/http_routes.rs
Signed-off-by: Mark S <the@wondersmith.dev>
…efactor-index-inbound-generalize-route-types Signed-off-by: Mark S <the@wondersmith.dev> # Conflicts: # policy-controller/core/src/routes.rs # policy-controller/k8s/index/src/inbound/index.rs # policy-controller/k8s/index/src/inbound/routes.rs # policy-controller/k8s/index/src/inbound/tests/routes/http.rs # policy-controller/k8s/index/src/outbound/index.rs
Signed-off-by: Mark S <the@wondersmith.dev>
adleong
reviewed
Jun 5, 2024
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
adleong
reviewed
Jun 6, 2024
} | ||
} | ||
|
||
fn inbound_server<'p>( | ||
&self, | ||
name: String, | ||
name: &str, |
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.
what's the purpose this change? String
seems more honest than &str
since we're going to to_string()
it anyway.
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.
…e type pattern Signed-off-by: Mark S <the@wondersmith.dev>
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.
Subject
Prepare to expand the subset of
Gateway API
route typeslinkerd
supports driving outbound traffic with inlinkerd-policy-controller-k8s-index
.Problem
Currently, the policy controller's
index
component is written withHTTPRoute
support (effectively) exclusively, both in its structure/organization as well as its naming (e.g.HttpRoute
as a primary type name,convert_http_route
as a method name, etc...).In order to expand the subset of route types defined by the Gateway API that
linkerd
supports for driving inbound traffic policy, the policy controller's inboundindex
component needs to be made more generic in both respects.Solution
PR introduces structural and naming changes making the codebase generic with respect to the type of route being handled (e.g.
HTTPRoute
->Route
). Changes are almost entirely cosmetic but may still appear rather extreme at first glance. Even so, PR should not be introducing any meaningful behavioral changes in refactored functions and methods.Validation
FixesLays Groundwork For Addressing