Skip to content
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

policy: Support Gateway API GRPCRoute resources #12404

Closed
olix0r opened this issue Apr 8, 2024 · 1 comment
Closed

policy: Support Gateway API GRPCRoute resources #12404

olix0r opened this issue Apr 8, 2024 · 1 comment

Comments

@olix0r
Copy link
Member

olix0r commented Apr 8, 2024

Linkerd supports the Gateway API's HTTPRoute resource for both inbound and outbound policy. Linkerd's Proxy API already includes GrpcRoute types; and the proxy has nascent support for consuming these routes, though this functionality has not been integration-tested, as the control plane's support was not introduced.

To support GRPCRoute in Linkerd, several changes need to be made:

  1. Add the CRD to the linkerd-crds chart.
  2. Use GRPCRoutes to drive outbound policy.
    • Manage resource statuses for GRPCRoute resources.
    • With API and end-to-end tests
  3. Allow GRPCRoutes to be targets for AuthorizationPolicy resources to drive inbound policy.
    • With API and end-to-end tests
adleong pushed a commit that referenced this issue 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>
Copy link

stale bot commented Jul 10, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 10, 2024
@olix0r olix0r closed this as completed Jul 26, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant