Skip to content

Commit 3c8cfd2

Browse files
committed
Upgrade Gateway API to v1.1.0 (nginx#1975)
* Upgrade Gateway API to v1.1.0
1 parent 5200fcc commit 3c8cfd2

File tree

68 files changed

+613
-713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+613
-713
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ jobs:
303303
make create-kind-cluster KIND_KUBE_CONFIG=${kube_config}
304304
echo "KUBECONFIG=${kube_config}" >> "$GITHUB_ENV"
305305
kind load docker-image ghcr.io/nginxinc/nginx-gateway-fabric:${{ steps.ngf-meta.outputs.version }} ghcr.io/nginxinc/nginx-gateway-fabric/nginx:${{ steps.nginx-meta.outputs.version }}
306-
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml
306+
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.1.0/standard-install.yaml
307307
308308
- name: Install Chart
309309
run: >

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ TELEMETRY_REPORT_PERIOD = 24h
1515
TELEMETRY_ENDPOINT=# if empty, NGF will report telemetry in its logs at debug level.
1616
TELEMETRY_ENDPOINT_INSECURE = false
1717

18-
GW_API_VERSION = 1.0.0
18+
GW_API_VERSION = 1.1.0
1919
ENABLE_EXPERIMENTAL = false
2020
NODE_VERSION = $(shell cat .nvmrc)
2121

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The following table lists the software versions NGINX Gateway Fabric supports.
6666

6767
| NGINX Gateway Fabric | Gateway API | Kubernetes | NGINX OSS | NGINX Plus |
6868
| -------------------- | ----------- | ---------- | --------- | ---------- |
69-
| Edge | 1.0.0 | 1.25+ | 1.25.5 | R31 |
69+
| Edge | 1.1.0 | 1.25+ | 1.25.5 | R31 |
7070
| 1.2.0 | 1.0.0 | 1.23+ | 1.25.4 | R31 |
7171
| 1.1.0 | 1.0.0 | 1.23+ | 1.25.3 | n/a |
7272
| 1.0.0 | 0.8.1 | 1.23+ | 1.25.2 | n/a |

apis/v1alpha1/clientsettingspolicy_types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ type ClientSettingsPolicyList struct {
3636

3737
// ClientSettingsPolicySpec defines the desired state of ClientSettingsPolicy.
3838
type ClientSettingsPolicySpec struct {
39-
// TargetRef identifies an API object to apply the policy to.
40-
// Object must be in the same namespace as the policy.
41-
//
42-
// Support: Gateway, HTTPRoute
43-
TargetRef gatewayv1alpha2.PolicyTargetReference `json:"targetRef"`
44-
4539
// Body defines the client request body settings.
4640
//
4741
// +optional
@@ -51,6 +45,12 @@ type ClientSettingsPolicySpec struct {
5145
//
5246
// +optional
5347
KeepAlive *ClientKeepAlive `json:"keepAlive,omitempty"`
48+
49+
// TargetRef identifies an API object to apply the policy to.
50+
// Object must be in the same namespace as the policy.
51+
//
52+
// Support: Gateway, HTTPRoute
53+
TargetRef gatewayv1alpha2.LocalPolicyTargetReference `json:"targetRef"`
5454
}
5555

5656
// ClientBody contains the settings for the client request body.

apis/v1alpha1/observabilitypolicy_types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ type ObservabilityPolicyList struct {
3737

3838
// ObservabilityPolicySpec defines the desired state of the ObservabilityPolicy.
3939
type ObservabilityPolicySpec struct {
40-
// TargetRef identifies an API object to apply the policy to.
41-
// Object must be in the same namespace as the policy.
42-
//
43-
// Support: HTTPRoute
44-
TargetRef gatewayv1alpha2.PolicyTargetReference `json:"targetRef"`
45-
4640
// Tracing allows for enabling and configuring tracing.
4741
//
4842
// +optional
4943
Tracing *Tracing `json:"tracing,omitempty"`
44+
45+
// TargetRef identifies an API object to apply the policy to.
46+
// Object must be in the same namespace as the policy.
47+
//
48+
// Support: HTTPRoute
49+
TargetRef gatewayv1alpha2.LocalPolicyTargetReference `json:"targetRef"`
5050
}
5151

5252
// Tracing allows for enabling and configuring OpenTelemetry tracing.

apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/nginx-gateway-fabric/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This chart deploys the NGINX Gateway Fabric in your Kubernetes cluster.
4040
> [see the Technical Specifications](https://github.com/nginxinc/nginx-gateway-fabric/blob/main/README.md#technical-specifications).
4141
4242
```shell
43-
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml
43+
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.1.0/standard-install.yaml
4444
```
4545

4646
## Installing the Chart
@@ -128,7 +128,7 @@ Gateway Fabric - [see the Technical Specifications](../../README.md#technical-sp
128128
To upgrade the Gateway CRDs from [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run:
129129

130130
```shell
131-
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml
131+
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.1.0/standard-install.yaml
132132
```
133133

134134
### Upgrading the CRDs
@@ -238,7 +238,7 @@ These commands remove all the Kubernetes components associated with the release
238238
To delete the Gateway API CRDs from [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run:
239239

240240
```shell
241-
kubectl delete -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml
241+
kubectl delete -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.1.0/standard-install.yaml
242242
```
243243

244244
## Configuration

charts/nginx-gateway-fabric/templates/rbac.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ rules:
9090
- gateways
9191
- httproutes
9292
- referencegrants
93+
- grpcroutes
9394
{{- if .Values.nginxGateway.gwAPIExperimentalFeatures.enable }}
9495
- backendtlspolicies
95-
- grpcroutes
9696
{{- end }}
9797
verbs:
9898
- list
@@ -103,9 +103,9 @@ rules:
103103
- httproutes/status
104104
- gateways/status
105105
- gatewayclasses/status
106+
- grpcroutes/status
106107
{{- if .Values.nginxGateway.gwAPIExperimentalFeatures.enable }}
107108
- backendtlspolicies/status
108-
- grpcroutes/status
109109
{{- end }}
110110
verbs:
111111
- update

cmd/gateway/validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
const (
1717
// nolint:lll
18-
// Regex from: https://github.com/kubernetes-sigs/gateway-api/blob/v1.0.0/apis/v1/shared_types.go#L640
18+
// Regex from: https://github.com/kubernetes-sigs/gateway-api/blob/v1.1.0/apis/v1/shared_types.go#L647
1919
controllerNameRegex = `^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$` //nolint:lll
2020
)
2121

config/crd/bases/gateway.nginx.org_clientsettingspolicies.yaml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,6 @@ spec:
133133
maxLength: 253
134134
minLength: 1
135135
type: string
136-
namespace:
137-
description: |-
138-
Namespace is the namespace of the referent. When unspecified, the local
139-
namespace is inferred. Even when policy targets a resource in a different
140-
namespace, it MUST only apply to traffic originating from the same
141-
namespace as the policy.
142-
maxLength: 63
143-
minLength: 1
144-
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
145-
type: string
146136
required:
147137
- group
148138
- kind
@@ -257,7 +247,7 @@ spec:
257247
258248
259249
* Gateway (Gateway conformance profile)
260-
* Service (Mesh conformance profile, experimental, ClusterIP Services only)
250+
* Service (Mesh conformance profile, ClusterIP Services only)
261251
262252
263253
Support for other resources is Implementation-Specific.
@@ -343,9 +333,6 @@ spec:
343333
344334
345335
Support: Extended
346-
347-
348-
<gateway:experimental>
349336
format: int32
350337
maximum: 65535
351338
minimum: 1
@@ -356,14 +343,12 @@ spec:
356343
following resources, SectionName is interpreted as the following:
357344
358345
359-
* Gateway: Listener Name. When both Port (experimental) and SectionName
346+
* Gateway: Listener name. When both Port (experimental) and SectionName
360347
are specified, the name and port of the selected listener must match
361348
both specified values.
362-
* Service: Port Name. When both Port (experimental) and SectionName
349+
* Service: Port name. When both Port (experimental) and SectionName
363350
are specified, the name and port of the selected listener must match
364-
both specified values. Note that attaching Routes to Services as Parents
365-
is part of experimental Mesh support and is not supported for any other
366-
purpose.
351+
both specified values.
367352
368353
369354
Implementations MAY choose to support attaching Routes to other resources.

0 commit comments

Comments
 (0)