Skip to content

Commit 5c876a9

Browse files
authored
docs: port docs changes (specify namespace & update Gateway API doc) (#261)
1 parent b9755de commit 5c876a9

File tree

8 files changed

+107
-57
lines changed

8 files changed

+107
-57
lines changed

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

Lines changed: 33 additions & 53 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,62 +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-
name: apisix
67-
spec:
68-
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.
6967

70-
---
68+
### HTTPRoute
7169

72-
apiVersion: gateway.networking.k8s.io/v1
73-
kind: Gateway
74-
metadata:
75-
name: apisix
76-
namespace: default
77-
spec:
78-
gatewayClassName: apisix
79-
listeners:
80-
- name: http
81-
protocol: HTTP
82-
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. |
8376

84-
---
77+
### Gateway
8578

86-
apiVersion: gateway.networking.k8s.io/v1
87-
kind: HTTPRoute
88-
metadata:
89-
name: httpbin
90-
spec:
91-
parentRefs:
92-
- name: apisix
93-
hostnames:
94-
- backends.example
95-
rules:
96-
- matches:
97-
- path:
98-
type: Exact
99-
value: /get
100-
- path:
101-
type: Exact
102-
value: /headers
103-
backendRefs:
104-
- name: httpbin
105-
port: 80
106-
```
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`. |

docs/en/latest/configure.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ The `controller_name` field is used to identify the `controllerName` in the Gate
5050
apiVersion: gateway.networking.k8s.io/v1
5151
kind: GatewayClass
5252
metadata:
53+
namespace: ingress-apisix
5354
name: apisix
5455
spec:
5556
controllerName: "apisix.apache.org/apisix-ingress-controller"

docs/en/latest/getting-started/configure-routes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ If you are using Gateway API, you should first configure the GatewayClass and Ga
6363
apiVersion: gateway.networking.k8s.io/v1
6464
kind: GatewayClass
6565
metadata:
66+
namespace: ingress-apisix
6667
name: apisix
6768
spec:
6869
controllerName: apisix.apache.org/apisix-ingress-controller
6970
---
7071
apiVersion: gateway.networking.k8s.io/v1
7172
kind: Gateway
7273
metadata:
74+
namespace: ingress-apisix
7375
name: apisix
7476
spec:
7577
gatewayClassName: apisix
@@ -107,6 +109,7 @@ values={[
107109
apiVersion: gateway.networking.k8s.io/v1
108110
kind: HTTPRoute
109111
metadata:
112+
namespace: ingress-apisix
110113
name: getting-started-ip
111114
spec:
112115
parentRefs:
@@ -129,6 +132,7 @@ spec:
129132
apiVersion: networking.k8s.io/v1
130133
kind: Ingress
131134
metadata:
135+
namespace: ingress-apisix
132136
name: getting-started-ip
133137
spec:
134138
ingressClassName: apisix
@@ -152,6 +156,7 @@ spec:
152156
apiVersion: apisix.apache.org/v2
153157
kind: ApisixRoute
154158
metadata:
159+
namespace: ingress-apisix
155160
name: getting-started-ip
156161
spec:
157162
ingressClassName: apisix

docs/en/latest/getting-started/key-authentication.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ If you are using Gateway API, you should first configure the GatewayClass and Ga
5353
apiVersion: gateway.networking.k8s.io/v1
5454
kind: GatewayClass
5555
metadata:
56+
namespace: ingress-apisix
5657
name: apisix
5758
spec:
5859
controllerName: apisix.apache.org/apisix-ingress-controller
5960
---
6061
apiVersion: gateway.networking.k8s.io/v1
6162
kind: Gateway
6263
metadata:
64+
namespace: ingress-apisix
6365
name: apisix
6466
spec:
6567
gatewayClassName: apisix
@@ -96,6 +98,7 @@ Create a Kubernetes manifest file to configure a consumer:
9698
apiVersion: apisix.apache.org/v1alpha1
9799
kind: Consumer
98100
metadata:
101+
namespace: ingress-apisix
99102
name: tom
100103
spec:
101104
gatewayRef:
@@ -113,6 +116,7 @@ Create a Kubernetes manifest file to configure a route and enable key authentica
113116
apiVersion: v1
114117
kind: Service
115118
metadata:
119+
namespace: ingress-apisix
116120
name: httpbin-external-domain
117121
spec:
118122
type: ExternalName
@@ -121,6 +125,7 @@ spec:
121125
apiVersion: apisix.apache.org/v1alpha1
122126
kind: PluginConfig
123127
metadata:
128+
namespace: ingress-apisix
124129
name: auth-plugin-config
125130
spec:
126131
plugins:
@@ -132,6 +137,7 @@ spec:
132137
apiVersion: gateway.networking.k8s.io/v1
133138
kind: HTTPRoute
134139
metadata:
140+
namespace: ingress-apisix
135141
name: getting-started-ip
136142
spec:
137143
parentRefs:
@@ -168,6 +174,7 @@ Create a Kubernetes manifest file to configure a consumer:
168174
apiVersion: apisix.apache.org/v2
169175
kind: ApisixConsumer
170176
metadata:
177+
namespace: ingress-apisix
171178
name: tom
172179
spec:
173180
ingressClassName: apisix
@@ -183,6 +190,7 @@ Create a Kubernetes manifest file to configure a route and enable key authentica
183190
apiVersion: apisix.apache.org/v2
184191
kind: ApisixUpstream
185192
metadata:
193+
namespace: ingress-apisix
186194
name: httpbin-external-domain
187195
spec:
188196
externalNodes:
@@ -192,6 +200,7 @@ spec:
192200
apiVersion: apisix.apache.org/v2
193201
kind: ApisixRoute
194202
metadata:
203+
namespace: ingress-apisix
195204
name: getting-started-ip
196205
spec:
197206
ingressClassName: apisix

docs/en/latest/getting-started/load-balancing.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ If you are using Gateway API, you should first configure the GatewayClass and Ga
5353
apiVersion: gateway.networking.k8s.io/v1
5454
kind: GatewayClass
5555
metadata:
56+
namespace: ingress-apisix
5657
name: apisix
5758
spec:
5859
controllerName: apisix.apache.org/apisix-ingress-controller
5960
---
6061
apiVersion: gateway.networking.k8s.io/v1
6162
kind: Gateway
6263
metadata:
64+
namespace: ingress-apisix
6365
name: apisix
6466
spec:
6567
gatewayClassName: apisix
@@ -96,6 +98,7 @@ values={[
9698
apiVersion: v1
9799
kind: Service
98100
metadata:
101+
namespace: ingress-apisix
99102
name: httpbin-external-domain
100103
spec:
101104
type: ExternalName
@@ -104,6 +107,7 @@ spec:
104107
apiVersion: v1
105108
kind: Service
106109
metadata:
110+
namespace: ingress-apisix
107111
name: mockapi7-external-domain
108112
spec:
109113
type: ExternalName
@@ -112,6 +116,7 @@ spec:
112116
apiVersion: apisix.apache.org/v1alpha1
113117
kind: BackendTrafficPolicy
114118
metadata:
119+
namespace: ingress-apisix
115120
name: passhost-node
116121
spec:
117122
targetRefs:
@@ -127,6 +132,7 @@ spec:
127132
apiVersion: gateway.networking.k8s.io/v1
128133
kind: HTTPRoute
129134
metadata:
135+
namespace: ingress-apisix
130136
name: lb-route
131137
spec:
132138
parentRefs:
@@ -153,6 +159,7 @@ spec:
153159
apiVersion: apisix.apache.org/v2
154160
kind: ApisixUpstream
155161
metadata:
162+
namespace: ingress-apisix
156163
name: httpbin-external-domain
157164
spec:
158165
scheme: https
@@ -166,6 +173,7 @@ spec:
166173
apiVersion: apisix.apache.org/v2
167174
kind: ApisixUpstream
168175
metadata:
176+
namespace: ingress-apisix
169177
name: mockapi7-external-domain
170178
spec:
171179
scheme: https
@@ -179,6 +187,7 @@ spec:
179187
apiVersion: apisix.apache.org/v2
180188
kind: ApisixRoute
181189
metadata:
190+
namespace: ingress-apisix
182191
name: lb-route
183192
spec:
184193
ingressClassName: apisix

docs/en/latest/getting-started/rate-limiting.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ If you are using Gateway API, you should first configure the GatewayClass and Ga
5353
apiVersion: gateway.networking.k8s.io/v1
5454
kind: GatewayClass
5555
metadata:
56+
namespace: ingress-apisix
5657
name: apisix
5758
spec:
5859
controllerName: apisix.apache.org/apisix-ingress-controller
5960
---
6061
apiVersion: gateway.networking.k8s.io/v1
6162
kind: Gateway
6263
metadata:
64+
namespace: ingress-apisix
6365
name: apisix
6466
spec:
6567
gatewayClassName: apisix
@@ -96,6 +98,7 @@ values={[
9698
apiVersion: v1
9799
kind: Service
98100
metadata:
101+
namespace: ingress-apisix
99102
name: httpbin-external-domain
100103
spec:
101104
type: ExternalName
@@ -104,6 +107,7 @@ spec:
104107
apiVersion: apisix.apache.org/v1alpha1
105108
kind: PluginConfig
106109
metadata:
110+
namespace: ingress-apisix
107111
name: limit-count-plugin-config
108112
spec:
109113
plugins:
@@ -116,6 +120,7 @@ spec:
116120
apiVersion: gateway.networking.k8s.io/v1
117121
kind: HTTPRoute
118122
metadata:
123+
namespace: ingress-apisix
119124
name: getting-started-ip
120125
spec:
121126
parentRefs:
@@ -144,6 +149,7 @@ spec:
144149
apiVersion: apisix.apache.org/v2
145150
kind: ApisixUpstream
146151
metadata:
152+
namespace: ingress-apisix
147153
name: httpbin-external-domain
148154
spec:
149155
externalNodes:
@@ -153,6 +159,7 @@ spec:
153159
apiVersion: apisix.apache.org/v2
154160
kind: ApisixRoute
155161
metadata:
162+
namespace: ingress-apisix
156163
name: getting-started-ip
157164
spec:
158165
ingressClassName: apisix

0 commit comments

Comments
 (0)