Skip to content

Commit e4cb606

Browse files
dependabot[bot]Kate Osborn
and
Kate Osborn
authored
Bump sigs.k8s.io/gateway-api from 0.6.2 to 0.7.0 (#643)
Bumps [sigs.k8s.io/gateway-api](https://github.com/kubernetes-sigs/gateway-api) from 0.6.2 to 0.7.0. - [Release notes](https://github.com/kubernetes-sigs/gateway-api/releases) - [Changelog](https://github.com/kubernetes-sigs/gateway-api/blob/main/CHANGELOG.md) - [Commits](kubernetes-sigs/gateway-api@v0.6.2...v0.7.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/gateway-api dependency-type: direct:production update-type: version-update:semver-minor ... Updates references and links to gateway-api and makes the following changes to the code based on 0.7.0 changes: - Replaces ListenerReasonUnsupportedAddress with ListenerUnsupportedValue. ListenerReasonUnsupportedAddress is now a Gateway condition reason. - Casts query parameter name to a string since it is now an HTTPHeaderName. Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kate Osborn <[email protected]>
1 parent 486bed0 commit e4cb606

File tree

11 files changed

+29
-35
lines changed

11 files changed

+29
-35
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The following table lists the software versions NGINX Kubernetes Gateway support
4343

4444
| NGINX Kubernetes Gateway | Gateway API | Kubernetes | NGINX OSS |
4545
|-|-|-|-|
46-
| Edge | 0.6.2 | 1.21+ | 1.21.x *|
46+
| Edge | 0.7.0 | 1.21+ | 1.21.x *|
4747
| 0.3.0 | 0.6.2 | 1.21+ | 1.21.x *|
4848
| 0.2.0 | 0.5.1 | 1.21+ | 1.21.x *|
4949
| 0.1.0 | 0.5.0 | 1.19+ | 1.21.3 |

cmd/gateway/setup.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
const (
1818
errTmpl = "failed validation - flag: '--%s' reason: '%s'\n"
1919
// nolint:lll
20-
// Regex from: https://github.com/kubernetes-sigs/gateway-api/blob/v0.6.2/apis/v1beta1/shared_types.go#L495
20+
// Regex from: https://github.com/kubernetes-sigs/gateway-api/blob/v0.7.0/apis/v1beta1/shared_types.go#L495
2121
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
2222
)
2323

docs/installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This guide walks you through how to install NGINX Kubernetes Gateway on a generi
2020
1. Install the Gateway API resources from the standard channel (the CRDs and the validating webhook):
2121

2222
```
23-
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.6.2/standard-install.yaml
23+
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.7.0/standard-install.yaml
2424
```
2525

2626
1. Create the nginx-gateway Namespace:

go.mod

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
k8s.io/apimachinery v0.26.3
1414
k8s.io/client-go v0.26.3
1515
sigs.k8s.io/controller-runtime v0.14.6
16-
sigs.k8s.io/gateway-api v0.6.2
16+
sigs.k8s.io/gateway-api v0.7.0
1717
)
1818

1919
require (
@@ -66,9 +66,9 @@ require (
6666
gopkg.in/inf.v0 v0.9.1 // indirect
6767
gopkg.in/yaml.v2 v2.4.0 // indirect
6868
gopkg.in/yaml.v3 v3.0.1 // indirect
69-
k8s.io/apiextensions-apiserver v0.26.1 // indirect
70-
k8s.io/component-base v0.26.1 // indirect
71-
k8s.io/klog/v2 v2.80.1 // indirect
69+
k8s.io/apiextensions-apiserver v0.26.3 // indirect
70+
k8s.io/component-base v0.26.3 // indirect
71+
k8s.io/klog/v2 v2.100.1 // indirect
7272
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
7373
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
7474
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect

go.sum

+9-9
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
271271
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
272272
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
273273
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
274-
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
274+
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
275275
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
276276
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
277277
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -605,16 +605,16 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
605605
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
606606
k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU=
607607
k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE=
608-
k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI=
609-
k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM=
608+
k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE=
609+
k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ=
610610
k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k=
611611
k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I=
612612
k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s=
613613
k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ=
614-
k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4=
615-
k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU=
616-
k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
617-
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
614+
k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g=
615+
k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E=
616+
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
617+
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
618618
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E=
619619
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
620620
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y=
@@ -624,8 +624,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
624624
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
625625
sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA=
626626
sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0=
627-
sigs.k8s.io/gateway-api v0.6.2 h1:583XHiX2M2bKEA0SAdkoxL1nY73W1+/M+IAm8LJvbEA=
628-
sigs.k8s.io/gateway-api v0.6.2/go.mod h1:EYJT+jlPWTeNskjV0JTki/03WX1cyAnBhwBJfYHpV/0=
627+
sigs.k8s.io/gateway-api v0.7.0 h1:/mG8yyJNBifqvuVLW5gwlI4CQs0NR/5q4BKUlf1bVdY=
628+
sigs.k8s.io/gateway-api v0.7.0/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso=
629629
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k=
630630
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
631631
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=

internal/nginx/config/servers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func createHTTPMatch(match v1beta1.HTTPRouteMatch, redirectPath string) httpMatc
277277
// The name and values are delimited by "=". A name and value can always be recovered using strings.SplitN(arg,"=", 2).
278278
// Query Parameters are case-sensitive so case is preserved.
279279
func createQueryParamKeyValString(p v1beta1.HTTPQueryParamMatch) string {
280-
return p.Name + "=" + p.Value
280+
return string(p.Name) + "=" + p.Value
281281
}
282282

283283
// The name and values are delimited by ":". A name and value can always be recovered using strings.Split(arg, ":").

internal/state/change_processor.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ func NewChangeProcessorImpl(cfg ChangeProcessorConfig) *ChangeProcessorImpl {
146146

147147
var err error
148148
switch o := obj.(type) {
149-
// We don't validate GatewayClass, because as of 0.6.2, the webhook doesn't validate it (it only
149+
// We don't validate GatewayClass, because as of 0.7.0, the webhook doesn't validate it (it only
150150
// validates an update that requires the previous version of the resource,
151151
// which NKG cannot reliably provide - for example, after NKG restarts).
152-
// https://github.com/kubernetes-sigs/gateway-api/blob/v0.6.2/apis/v1beta1/validation/gatewayclass.go#L28
152+
// https://github.com/kubernetes-sigs/gateway-api/blob/v0.7.0/apis/v1beta1/validation/gatewayclass.go#L28
153153
case *v1beta1.Gateway:
154154
err = gwapivalidation.ValidateGateway(o).ToAggregate()
155155
case *v1beta1.HTTPRoute:

internal/state/conditions/conditions.go

-10
Original file line numberDiff line numberDiff line change
@@ -220,16 +220,6 @@ func NewListenerConflictedHostname(msg string) []Condition {
220220
}
221221
}
222222

223-
// NewListenerUnsupportedAddress returns a Condition that indicates that the address of a Listener is unsupported.
224-
func NewListenerUnsupportedAddress(msg string) Condition {
225-
return Condition{
226-
Type: string(v1beta1.ListenerConditionAccepted),
227-
Status: metav1.ConditionFalse,
228-
Reason: string(v1beta1.ListenerReasonUnsupportedAddress),
229-
Message: msg,
230-
}
231-
}
232-
233223
// NewListenerUnsupportedProtocol returns a Condition that indicates that the protocol of a Listener is unsupported.
234224
func NewListenerUnsupportedProtocol(msg string) Condition {
235225
return Condition{

internal/state/graph/gateway_listener.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func createAddressesValidator(gw *v1beta1.Gateway) listenerValidator {
197197
if len(gw.Spec.Addresses) > 0 {
198198
path := field.NewPath("spec", "addresses")
199199
valErr := field.Forbidden(path, "addresses are not supported")
200-
return []conditions.Condition{conditions.NewListenerUnsupportedAddress(valErr.Error())}
200+
return []conditions.Condition{conditions.NewListenerUnsupportedValue(valErr.Error())}
201201
}
202202
return nil
203203
}

internal/state/graph/gateway_test.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,9 @@ func TestBuildGateway(t *testing.T) {
353353
Source: listener805,
354354
Valid: false,
355355
Conditions: []conditions.Condition{
356-
conditions.NewListenerPortUnavailable(`port: Unsupported value: 81: supported values: "80"`),
356+
conditions.NewListenerPortUnavailable(
357+
`port: Unsupported value: 81: supported values: "80"`,
358+
),
357359
},
358360
},
359361
},
@@ -370,7 +372,9 @@ func TestBuildGateway(t *testing.T) {
370372
Source: listener4436,
371373
Valid: false,
372374
Conditions: []conditions.Condition{
373-
conditions.NewListenerPortUnavailable(`port: Unsupported value: 444: supported values: "443"`),
375+
conditions.NewListenerPortUnavailable(
376+
`port: Unsupported value: 444: supported values: "443"`,
377+
),
374378
},
375379
},
376380
},
@@ -515,7 +519,7 @@ func TestBuildGateway(t *testing.T) {
515519
Source: listener801,
516520
Valid: false,
517521
Conditions: []conditions.Condition{
518-
conditions.NewListenerUnsupportedAddress(
522+
conditions.NewListenerUnsupportedValue(
519523
"spec.addresses: Forbidden: addresses are not supported",
520524
),
521525
},
@@ -525,7 +529,7 @@ func TestBuildGateway(t *testing.T) {
525529
Valid: false,
526530
SecretPath: "",
527531
Conditions: []conditions.Condition{
528-
conditions.NewListenerUnsupportedAddress(
532+
conditions.NewListenerUnsupportedValue(
529533
"spec.addresses: Forbidden: addresses are not supported",
530534
),
531535
},

internal/state/graph/httproute.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ func validateQueryParamMatch(
439439
allErrs = append(allErrs, valErr)
440440
}
441441

442-
if err := validator.ValidateQueryParamNameInMatch(q.Name); err != nil {
442+
if err := validator.ValidateQueryParamNameInMatch(string(q.Name)); err != nil {
443443
valErr := field.Invalid(queryParamPath.Child("name"), q.Name, err.Error())
444444
allErrs = append(allErrs, valErr)
445445
}

0 commit comments

Comments
 (0)