Skip to content

Commit 3d4d833

Browse files
authored
docs: update gateway api docs (#2558)
1 parent 8f85e7f commit 3d4d833

File tree

1 file changed

+33
-55
lines changed

1 file changed

+33
-55
lines changed

docs/en/latest/concepts/gateway-api.md

Lines changed: 33 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ keywords:
99
<!--
1010
#
1111
# Licensed to the Apache Software Foundation (ASF) under one or more
12-
# contributor license agreements. See the NOTICE file distributed with
12+
# contributor license agreements. See the NOTICE file distributed with
1313
# this work for additional information regarding copyright ownership.
1414
# The ASF licenses this file to You under the Apache License, Version 2.0
1515
# (the "License"); you may not use this file except in compliance with
16-
# the License. You may obtain a copy of the License at
16+
# the License. You may obtain a copy of the License at
1717
#
1818
# http://www.apache.org/licenses/LICENSE-2.0
1919
#
@@ -31,11 +31,15 @@ By supporting Gateway API, the APISIX Ingress controller can realize richer func
3131

3232
## Concepts
3333

34-
- **GatewayClass**: Defines a set of Gateways that share a common configuration and behavior. Each GatewayClass is handled by a single controller, although controllers may handle more than one GatewayClass.
35-
- **Gateway**: A resource in Kubernetes that describes how traffic can be translated to services within the cluster.
36-
- **HTTPRoute**: Can be attached to a Gateway to configure HTTP
37-
38-
For more information about Gateway API, please refer to [Gateway API](https://gateway-api.sigs.k8s.io/).
34+
- **GatewayClass**: Defines a class of Gateways with a shared configuration and behavior. Each GatewayClass is managed by a single controller, although a controller may support multiple GatewayClasses.
35+
- **Gateway**: Represents a request for network traffic handling within the cluster. A Gateway specifies how traffic enters the cluster and is directed to backend Services, typically by binding to one or more listeners.
36+
- **HTTPRoute**: Configures routing for HTTP traffic.
37+
- **GRPCRoute**: Configures routing for gRPC traffic.
38+
- **ReferenceGrant**: Grants permission to reference resources across namespaces.
39+
- **TLSRoute**: Defines routing rules for terminating or passing through TLS traffic.
40+
- **TCPRoute**: Configures routing for TCP traffic.
41+
- **UDPRoute**: Configures routing for UDP traffic.
42+
- **BackendTLSPolicy**: Specifies how a Gateway should validate TLS connections to its backends, including trusted certificate authorities and verification modes.
3943

4044
## Gateway API Support Level
4145

@@ -45,64 +49,38 @@ For more information about Gateway API, please refer to [Gateway API](https://ga
4549
| Gateway | Partially supported | Partially supported | Not supported | v1 |
4650
| HTTPRoute | Supported | Partially supported | Not supported | v1 |
4751
| GRPCRoute | Not supported | Not supported | Not supported | v1 |
48-
| ReferenceGrant | Not supported | Not supported | Not supported | v1beta1 |
52+
| ReferenceGrant | Supported | Not supported | Not supported | v1beta1 |
4953
| TLSRoute | Not supported | Not supported | Not supported | v1alpha2 |
5054
| TCPRoute | Not supported | Not supported | Not supported | v1alpha2 |
5155
| UDPRoute | Not supported | Not supported | Not supported | v1alpha2 |
5256
| BackendTLSPolicy | Not supported | Not supported | Not supported | v1alpha3 |
5357

54-
## HTTPRoute
58+
## Examples
5559

56-
The HTTPRoute resource allows users to configure HTTP routing by matching HTTP traffic and forwarding it to Kubernetes backends. Currently, the only backend supported by APISIX Gateway is the Service resource.
60+
For configuration examples, see the Gateway API tabs in [Configuration Examples](../reference/example.md).
5761

58-
### Example
62+
For a complete list of configuration options, refer to the [Gateway API Reference](https://gateway-api.sigs.k8s.io/reference/spec/). Be aware that some fields are not supported, or partially supported.
5963

60-
The following example demonstrates how to configure an HTTPRoute resource to route traffic to the `httpbin` service:
64+
## Unsupported / Partially Supported Fields
6165

62-
```yaml
63-
apiVersion: gateway.networking.k8s.io/v1
64-
kind: GatewayClass
65-
metadata:
66-
namespace: ingress-apisix
67-
name: apisix
68-
spec:
69-
controllerName: "apisix.apache.org/apisix-ingress-controller"
66+
The fields below are specified in the Gateway API specification but are either partially implemented or not yet supported in the APISIX Ingress Controller.
7067

71-
---
68+
### HTTPRoute
7269

73-
apiVersion: gateway.networking.k8s.io/v1
74-
kind: Gateway
75-
metadata:
76-
namespace: ingress-apisix
77-
name: apisix
78-
spec:
79-
gatewayClassName: apisix
80-
listeners:
81-
- name: http
82-
protocol: HTTP
83-
port: 80
70+
| Fields | Status | Notes |
71+
|--------------------------------|------------------------|-----------------------------------------------------------------------------------------|
72+
| `spec.timeouts` | Not supported | The field is unsupported because ADC provides finer-grained timeout configuration (connect, read, write), whereas `spec.timeouts` only allows a general total timeout and upstream timeout, so it cannot be directly mapped. To configure route timeouts, you can use [BackendTrafficPolicy](../reference/api-reference.md#backendtrafficpolicyspec). |
73+
| `spec.retries` | Not supported | The field is unsupported because APISIX does not support the features in retries. To configure route retries, you can use [BackendTrafficPolicy](../reference/api-reference.md#backendtrafficpolicyspec). |
74+
| `spec.sessionPersistence` | Not supported | APISIX does not support the configuration of cookie lifetimes. As an alternative, you can use [`chash` load balancer](../reference/api-reference.md#loadbalancer). |
75+
| `spec.rules[].backendRefs[].filters[]` | Not supported | BackendRef-level filters are not implemented as data plane does not support filtering at this level; only rule-level filters (`spec.rules[].filters[]`) are supported. |
8476

85-
---
77+
### Gateway
8678

87-
apiVersion: gateway.networking.k8s.io/v1
88-
kind: HTTPRoute
89-
metadata:
90-
namespace: ingress-apisix
91-
name: httpbin
92-
spec:
93-
parentRefs:
94-
- name: apisix
95-
hostnames:
96-
- backends.example
97-
rules:
98-
- matches:
99-
- path:
100-
type: Exact
101-
value: /get
102-
- path:
103-
type: Exact
104-
value: /headers
105-
backendRefs:
106-
- name: httpbin
107-
port: 80
108-
```
79+
| Fields | Status | Notes |
80+
|------------------------------------------------------|----------------------|------------------------------------------------------------------------------------------------|
81+
| `spec.listeners[].port` | Not supported* | The configuration is required but ignored. This is due to limitations in the data plane: it cannot dynamically open new ports. Since the Ingress Controller does not manage the data plane deployment, it cannot automatically update the configuration or restart the data plane to apply port changes. |
82+
| `spec.listeners[].allowedRoutes.kinds` | Partially supported | Only `HTTPRoute` (group `gateway.networking.k8s.io`) is accepted; other kinds are rejected. |
83+
| `spec.listeners[].tls.certificateRefs[].group` | Partially supported | Only `""` is supported; other group values cause validation failure. |
84+
| `spec.listeners[].tls.certificateRefs[].kind` | Partially supported | Only `Secret` is supported. |
85+
| `spec.listeners[].tls.mode` | Partially supported | `Terminate` is implemented; `Passthrough` is effectively unsupported for Gateway listeners. |
86+
| `spec.addresses` | Not supported | Controller does not read or act on `spec.addresses`. |

0 commit comments

Comments
 (0)