Skip to content

Commit c5d5cf0

Browse files
Document cli args and Gateway API compatibility (#201)
- Add cli args doc - Fix the description of the gateway-ctlr-name cli arg - Add Gateway APi compatibility doc Co-authored-by: kate-osborn <50597707+kate-osborn@users.noreply.github.com>
1 parent bc044b7 commit c5d5cf0

File tree

3 files changed

+132
-3
lines changed

3 files changed

+132
-3
lines changed

cmd/gateway/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import (
1212
)
1313

1414
const (
15-
domain string = "k8s-gateway.nginx.org"
15+
domain string = "k8s-gateway.nginx.org"
16+
namespace string = "nginx-gateway"
1617
)
1718

1819
var (
@@ -25,7 +26,7 @@ var (
2526
gatewayCtlrName = flag.String(
2627
"gateway-ctlr-name",
2728
"",
28-
fmt.Sprintf("The name of the Gateway controller. The controller name must be of the form: DOMAIN/NAMESPACE/NAME. The controller's domain is '%s'.", domain),
29+
fmt.Sprintf("The name of the Gateway controller. The controller name must be of the form: DOMAIN/NAMESPACE/NAME. The controller's domain is '%s'; the namespace is '%s'", domain, namespace),
2930
)
3031

3132
gatewayClassName = flag.String(
@@ -46,7 +47,7 @@ func main() {
4647

4748
MustValidateArguments(
4849
flag.CommandLine,
49-
GatewayControllerParam(domain, "nginx-gateway" /* FIXME(f5yacobucci) dynamically set */),
50+
GatewayControllerParam(domain, namespace /* FIXME(f5yacobucci) dynamically set */),
5051
GatewayClassParam(),
5152
)
5253

docs/cli-args.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Command-line Arguments
2+
3+
The table below describes the command-line arguments of the `gateway` binary from the `nginx-kubernetes-gateway` container.
4+
5+
| Name | Type | Description |
6+
|-|-|-|
7+
|`gateway-ctlr-name` | `string` | The name of the Gateway controller. The controller name must be of the form: `DOMAIN/NAMESPACE/NAME`. The controller's domain is `k8s-gateway.nginx.org`; the namespace is `nginx-ingress`. |
8+
|`gatewayclass`| `string` | The name of the GatewayClass resource. Every NGINX Gateway must have a unique corresponding GatewayClass resource. |

docs/gateway-api-compatibility.md.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Gateway API Compatibility
2+
3+
This document describes which Gateway API resources NGINX Kubernetes Gateway supports and the extent of that support.
4+
5+
## Summary
6+
7+
| Resource | Support Status |
8+
|-|-|
9+
| [GatewayClass](#gatewayclass) | Partially supported |
10+
| [Gateway](#gateway) | Partially supported |
11+
| [HTTPRoute](#httproute) | Partially supported |
12+
| [TLSRoute](#tlsroute) | Not supported |
13+
| [TCPRoute](#tcproute) | Not supported |
14+
| [UDPRoute](#udproute) | Not supported |
15+
| [ReferenceGrant](#referencegrant) | Not supported |
16+
| [Custom policies](#custom-policies) | Not supported |
17+
18+
## Terminology
19+
20+
We use the following words to describe support status:
21+
- *Supported*. The resource or field is fully supported and conformant to the Gateway API specification.
22+
- *Partially supported*. The resource or field is supported partially or with limitations. It will become fully supported in future releases.
23+
- *Not supported*. The resource or field is not yet supported. It will become partially or fully supported in future releases.
24+
25+
Note: it might be possible that NGINX Kubernetes Gateway will never support some resources and/or fields of the Gateway API. We will document these decisions on a case by case basis.
26+
27+
## Resources
28+
29+
Below we list the resources and the support status of their corresponding fields.
30+
31+
For a description of each field, visit the [Gateway API documentation](https://gateway-api.sigs.k8s.io/references/spec/).
32+
33+
### GatewayClass
34+
35+
> Status: Partially supported.
36+
37+
NGINX Kubernetes Gateway supports only a single GatewayClass resource configured via `--gatewayclass` [cli argument](./cli-args.md).
38+
39+
Fields:
40+
* `spec`
41+
* `controllerName` - supported.
42+
* `parametersRef` - not supported.
43+
* `description` - supported.
44+
* `status`
45+
* `conditions` - partially supported.
46+
47+
### Gateway
48+
49+
> Status: Partially supported.
50+
51+
NGINX Kubernetes Gateway supports only a single Gateway resource. The Gateway resource must reference NGINX Kubernetes Gateway's corresponding GatewayClass. In case of multiple Gateway resources created in the cluster, NGINX Kubernetes Gateway will use a deterministic conflict resolution strategy: it will choose the oldest resource by creation timestamp. If the timestamps are equal, NGINX Kubernetes Gateway will choose the resource that appears first in alphabetical order by “{namespace}/{name}”. We might support multiple Gateway resources. Please share your use case with us if you're interested in that support.
52+
53+
Fields:
54+
* `spec`
55+
* `gatewayClassName` - supported.
56+
* `listeners`
57+
* `name` - supported.
58+
* `hostname` - partially supported. Wildcard hostnames like `*.example.com` are not yet supported.
59+
* `port` - partially supported. Allowed values: `80` for HTTP listeners and `443` for HTTPS listeners.
60+
* `protocol` - partially supported. Allowed values: `HTTP`, `HTTPS`.
61+
* `tls`
62+
* `mode` - partially supported. Allowed value: `Terminate`.
63+
* `certificateRefs` - partially supported. The TLS certificate and key must be stored in a Secret resource of type `kubernetes.io/tls` in the same namespace as the Gateway resource. Only a single reference is supported. You must deploy the Secret before the Gateway resource. Secret rotation (watching for updates) is not supported.
64+
* `options` - not supported.
65+
* `allowedRoutes` - not supported.
66+
* `addresses` - not supported.
67+
* `status`
68+
* `addresses` - not supported.
69+
* `conditions` - not supported.
70+
* `listeners`
71+
* `name` - supported.
72+
* `supportedKinds` - not supported.
73+
* `attachedRoutes` - supported.
74+
* `conditions` - partially supported.
75+
76+
### HTTPRoute
77+
78+
> Status: Partially supported.
79+
80+
Fields:
81+
* `spec`
82+
* `parentRefs` - partially supported. `sectionName` must always be set.
83+
* `hostnames` - partially supported. Wildcard binding is not supported: a hostname like `example.com` will not bind to a listener with the hostname `*.example.com`. However, `example.com` will bind to a listener with the empty hostname.
84+
* `rules`
85+
* `matches`
86+
* `path` - partially supported. Only `PathPrefix` type.
87+
* `headers` - partially supported. Only `Exact` type.
88+
* `queryParams` - partially supported. Only `Exact` type.
89+
* `method` - supported.
90+
* `filters` - not supported.
91+
* `backendRefs` - partially supported. Only a single backend ref without support for `weight`. Backend ref `filters` are not supported. NGINX Kubernetes Gateway will use the IP of the Service as a backend, not the IPs of the corresponding Pods. Watching for Service updates is not supported.
92+
* `status`
93+
* `parents`
94+
* `parentRef` - supported.
95+
* `controllerName` - supported.
96+
* `conditions` - partially supported.
97+
98+
### TLSRoute
99+
100+
> Status: Not supported.
101+
102+
### TCPRoute
103+
104+
> Status: Not supported.
105+
106+
### UDPRoute
107+
108+
> Status: Not supported.
109+
110+
### ReferenceGrant
111+
112+
> Status: Not supported.
113+
114+
### Custom Policies
115+
116+
> Status: Not supported.
117+
118+
Custom policies will be NGINX Kubernetes Gateway-specific CRDs that will allow supporting features like timeouts, load-balancing methods, authentication, etc. - important data-plane features that are not part of the Gateway API spec.
119+
120+
While those CRDs are not part of the Gateway API, the mechanism of attaching them to Gateway API resources is part of the Gateway API. See the [Policy Attachment doc](https://gateway-api.sigs.k8s.io/references/policy-attachment/).

0 commit comments

Comments
 (0)