-
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(core+grpc): preliminary name changes to make route types generic #12662
Closed
the-wondersmith
wants to merge
8
commits into
linkerd:main
from
the-wondersmith:policy-refactor-core-grpc-generalize-route-types
Closed
refactor(core+grpc): preliminary name changes to make route types generic #12662
the-wondersmith
wants to merge
8
commits into
linkerd:main
from
the-wondersmith:policy-refactor-core-grpc-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>
2 tasks
Signed-off-by: Mark S <the@wondersmith.dev>
Signed-off-by: Mark S <the@wondersmith.dev>
2 tasks
the-wondersmith
changed the title
refactor: preliminary name changes to make route types generic
refactor(core+grpc): preliminary name changes to make route types generic
May 31, 2024
adleong
approved these changes
May 31, 2024
olix0r
approved these changes
Jun 3, 2024
2 tasks
adleong
pushed a commit
that referenced
this pull request
Jun 3, 2024
## Subject Prepare to expand `linkerd`'s repertoire of supported [`Gateway API`](https://gateway-api.sigs.k8s.io/api-types/grpcroute/) route types in [`linkerd-policy-controller-k8s-status`](https://github.com/linkerd/linkerd2/tree/main/policy-controller/k8s/status). ## Problem Currently, the policy controller's `status` component is written with `HTTPRoute` support (effectively) exclusively, both in its structure/organization as well as its naming (e.g. `HttpRoute` as a primary type name, `update_http_route` as a method name, etc...). In order to expand `linkerd`'s support for the route types defined by the Gateway API, the policy controller's `status` component needs to be made more generic in both respects. ## Solution > **NOTE:** PR was opened out of order and should only be merged _after_ #12662 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 introducing only a couple of minor functional changes, most notably: - making the `status` argument to [`make_patch`](https://github.com/the-wondersmith/linkerd2/blob/8d6cd57b70110daccc38288aaac8a7c04091c5fc/policy-controller/k8s/status/src/index.rs#L734) generic - adding a type-aware `api_version` helper method to [`NamespaceGroupKindName`](https://github.com/the-wondersmith/linkerd2/blob/8d6cd57b70110daccc38288aaac8a7c04091c5fc/policy-controller/k8s/status/src/resource_id.rs#L27) - **note:** *required for proper handling of different route types in the future* ## Validation - [X] maintainer review - [X] tests pass ![Screenshot 2024-05-30 at 11 50 28 AM](https://github.com/linkerd/linkerd2/assets/61921871/bf90c474-5af7-43c6-bffd-017042dc495d) ## ~~Fixes~~ *Lays Groundwork For Addressing* - #12404 Signed-off-by: Mark S <the@wondersmith.dev>
…ize-route-types Signed-off-by: Mark S <the@wondersmith.dev> # Conflicts: # 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>
Signed-off-by: Mark S <the@wondersmith.dev>
Technically already merged in #12661 |
the-wondersmith
deleted the
policy-refactor-core-grpc-generalize-route-types
branch
June 5, 2024 18:30
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
linkerd
's repertoire of supportedGateway API
route types inlinkerd-policy-controller
.Problem
In order to expand
linkerd
's support for the route types defined by the Gateway API, the policy controller'score
andgrpc
components need to adopt a more generic naming convention with respect to route-oriented types and modules.Solution
PR introduces structural and naming changes making the codebase generic with respect to the type of route being handled (e.g.
http_route
->routes
). Changes are entirely cosmetic and organizational, PR includes no functional or behavioral changes.Validation
FixesLays Groundwork For Addressing