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

API gateway compatability #1886

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7218854
Add a draft of api gateway compatability
GTRekter Nov 29, 2024
d072d62
api gateway http page
GTRekter Nov 29, 2024
62280b5
rename page
GTRekter Nov 29, 2024
5103ef9
Add first draft of grpc
GTRekter Nov 29, 2024
efa17ee
November Edge Release Roundup (#1885)
kflynn Nov 30, 2024
5b39d88
Headings should be surrounded by blank lines
GTRekter Dec 2, 2024
27112a1
Headings should be surrounded by blank lines
GTRekter Dec 2, 2024
91b2dd1
Prettify content
GTRekter Dec 2, 2024
315bf15
add Signed-off-by: Ivan Porta <[email protected]>
GTRekter Dec 2, 2024
73c82ec
This was not written in May of 2024. :) (#1888)
kflynn Dec 2, 2024
ee66fb2
Chris Campbell's Tilt, Linkerd, and NGINX blog, part 1 (#1889)
kflynn Dec 3, 2024
dcb0dcd
Add missing troubleshooting slugs (#1882)
adleong Dec 4, 2024
aadf112
Rate Limiting docs (#1877)
alpeb Dec 4, 2024
fac07c5
Add egress documentation (#1884)
zaharidichev Dec 4, 2024
d28512a
Generated images (#1891)
travisbeckham Dec 4, 2024
56664d8
Add federated services docs (#1874)
adleong Dec 4, 2024
cfa13a4
apply protocol detection docs update to edge (#1873)
adleong Dec 4, 2024
871605b
Minor protocol-detection doc tweak (#1892)
kflynn Dec 4, 2024
7ed0ec6
Update 2.16 K8s versions (this got missed when 2.16 was released, sig…
kflynn Dec 5, 2024
3c1c32b
2.17 documentation (#1893)
kflynn Dec 5, 2024
1ccc28b
2.17 announcement blog post (#1890)
travisbeckham Dec 5, 2024
108a979
Updated doc links to avoid caching issue (#1896)
travisbeckham Dec 5, 2024
c4892cb
Fixed typo in 2.17 announcement blog post (#1897)
travisbeckham Dec 5, 2024
d239079
Inline author data (#1898)
travisbeckham Dec 5, 2024
bec49d5
What is a service mesh tweaks (#1773)
CathPag Dec 6, 2024
e8a079e
build(deps): update linkerd/dev from v30 to v44 (#1895)
olix0r Dec 6, 2024
4af51f7
fix typo (#1899)
GTRekter Dec 9, 2024
4b3363b
Update ambassadors (#1900)
travisbeckham Dec 16, 2024
442066c
Add Ambassador Program 2.0 blog post (#1881)
travisbeckham Dec 16, 2024
41b1f1b
update version
Dec 20, 2024
1a3534e
add reference to rate limiting
Dec 20, 2024
f7d3826
signed
Dec 20, 2024
0f0ab5a
Merge branch 'main' into ivanp/apigateway-compatability
GTRekter Dec 20, 2024
2dc934f
fix line lenght
Dec 20, 2024
6189983
Merge branch 'ivanp/apigateway-compatability' of https://github.com/G…
Dec 20, 2024
56cb9e2
add trailing spaces
Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions linkerd.io/content/2-edge/reference/apigateway-grpcroute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: Gateway API gRPCRoutes
description: Reference guide to Gateway API gRPCRoutes resources.
---

<!-- markdownlint-disable-file blanks-around-tables -->
<!-- markdownlint-disable-file table-column-count -->
<!-- markdownlint-disable-file table-pipe-style -->

## Linkerd and Gateway API gRPCRoutes

Samelessy to HTTPRoute, Linkerd supports the Kubernetes Gateway API gRPC
resources alongside its own traffic management API. Linkerd automatically
installs these CRDs during the installation process unless the
`--set enableHttpRoutes=false` flag or the `enableHttpRoutes=false` Helm value
is explicitly set. By default, Linkerd installs the
`grpcroutes.gateway.networking.k8s.io/v1alpha2` CRDs, which are based on version
0.7 of the Gateway API.

{{< warning >}} Newer versions of the Gateway API may include these CRDs but
might not serve them. This can cause the policy container in Linkerd's
linkerd-destination pods to fail during startup. {{< /warning >}}

The table below shows the latest supported versions of the Gateway API and the
features they enable:

| Feature | GRPCRoute |
| ----------------- | ------------ |
| Traffic Splitting | v0.7.0 |
| Header Matching | v0.7.0 |
| Path Matching | v0.7.0 |
| Rate Limiting | - |
| Circuit Breaking | v0.7.0 |
| Authentication | v0.7.0 |

## GRPCRoute Examples

### Traffic Splitting Example

This example demonstrates how to split traffic between two backends. A portion
of requests is directed to the `smiley2` backend Service, while the rest go to
the `smiley` backend Service.

```yaml
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GRPCRoute
metadata:
name: smiley-a-b
namespace: faces
spec:
parentRefs:
- name: smiley
kind: Service
group: core
port: 50051
rules:
- backendRefs:
- name: smiley
port: 50051
weight: 40
- name: smiley2
port: 80
weight: 50051
```

[Gateway API]: https://gateway-api.sigs.k8s.io/
[ns-boundaries]:
https://gateway-api.sigs.k8s.io/geps/gep-1426/#namespace-boundaries

111 changes: 111 additions & 0 deletions linkerd.io/content/2-edge/reference/apigateway-httproute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: Gateway API HTTPRoutes
description: Reference guide to Gateway API HTTPRoutes resources.
---

<!-- markdownlint-disable-file blanks-around-tables -->
<!-- markdownlint-disable-file table-column-count -->
<!-- markdownlint-disable-file table-pipe-style -->

## Linkerd and Gateway API HTTPRoutes

Linkerd supports the Kubernetes Gateway API alongside its own traffic management
API. The Gateway API serves as the upstream for Linkerd's HTTPRoute resource.
Linkerd automatically installs these CRDs during the installation process unless
the `--set enableHttpRoutes=false` flag or the `enableHttpRoutes=false` Helm
value is explicitly set. By default, Linkerd installs the
`httproutes.gateway.networking.k8s.io/v1beta1` CRDs, which are based on version
0.7 of the Gateway API.

{{< warning >}} Newer versions of the Gateway API may include these CRDs but
might not serve them. This can cause the policy container in Linkerd's
linkerd-destination pods to fail during startup. {{< /warning >}}

Some features in the Gateway API, like timeouts, are not yet stabilized. To
leverage these features, you must use the `policy.linkerd.io` HTTPRoute
resource. Both Linkerd-specific and Gateway API HTTPRoute definitions coexist
within the same cluster and can be used to configure policies for Linkerd.

The table below shows the latest supported versions of the Gateway API and the
features they enable:

| Feature | HTTPRoute |
| ----------------- | ------------------- |
| Traffic Splitting | v1.1.1-experimental |
| Header Matching | v1.1.1-experimental |
| Path Matching | v1.1.1-experimental |
| Retry Policies | v1.1.1-experimental |
| Rate Limiting | - |
| Circuit Breaking | v1.1.1-experimental |
| Authentication | v1.1.1-experimental |
| Timeouts | - |

To manage rate limiting, you can use Linkerd's rate-limiting functionality,
which is configured via HTTPLocalRateLimitPolicy resources. For more
information, see [rate limiting](#rate-limiting).

## HTTPRoute Examples

### Header-Based Routing Example

This example demonstrates how an HTTPRoute can route traffic based on a header
value. If the request contains the header `x-faces-user: testuser`, it is
directed to the `smiley2` backend Service. All other requests are routed to the
`smiley` backend Service.

```yaml
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: smiley-a-b
namespace: faces
spec:
parentRefs:
- name: smiley
kind: Service
group: core
port: 80
rules:
- matches:
- headers:
- name: 'x-faces-user'
value: 'testuser'
backendRefs:
- name: smiley2
port: 80
- backendRefs:
- name: smiley
port: 80
```

### Traffic Splitting Example

This example demonstrates how to split traffic between two backends. A portion
of requests is directed to the `smiley2` backend Service, while the rest go to
the `smiley` backend Service.

```yaml
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: smiley-a-b
namespace: faces
spec:
parentRefs:
- name: smiley
kind: Service
group: core
port: 80
rules:
- backendRefs:
- name: smiley
port: 80
weight: 40
- name: smiley2
port: 80
weight: 60
```

[Gateway API]: https://gateway-api.sigs.k8s.io/
[ns-boundaries]:
https://gateway-api.sigs.k8s.io/geps/gep-1426/#namespace-boundaries
1 change: 1 addition & 0 deletions linkerd.io/content/2-edge/reference/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ that runs before any other containers are started. It [uses
iptables](../iptables/) to route all TCP traffic to and from the pod through
the proxy. Linkerd's init container can be run in [different
modes](../../features/nft/) which determine what iptables variant is used.

Loading