Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to gateway api v0.7.0 #1415

Merged
merged 8 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ jobs:
- name: Run Conformance Tests
env:
KIND_NODE_TAG: ${{ matrix.version }}
CONFORMANCE_UNIQUE_PORTS: false
IMAGE_PULL_POLICY: IfNotPresent
run: make conformance

Expand Down Expand Up @@ -122,7 +121,6 @@ jobs:
- name: Run E2E Tests
env:
KIND_NODE_TAG: ${{ matrix.version }}
CONFORMANCE_UNIQUE_PORTS: false
IMAGE_PULL_POLICY: IfNotPresent
run: make e2e

Expand Down
124 changes: 85 additions & 39 deletions charts/gateway-helm/crds/gatewayapi-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1923
gateway.networking.k8s.io/bundle-version: v0.7.0-rc1
gateway.networking.k8s.io/bundle-version: v0.7.0
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: gatewayclasses.gateway.networking.k8s.io
Expand Down Expand Up @@ -459,7 +459,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1923
gateway.networking.k8s.io/bundle-version: v0.7.0-rc1
gateway.networking.k8s.io/bundle-version: v0.7.0
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: gateways.gateway.networking.k8s.io
Expand Down Expand Up @@ -1898,7 +1898,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1923
gateway.networking.k8s.io/bundle-version: v0.7.0-rc1
gateway.networking.k8s.io/bundle-version: v0.7.0
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: grpcroutes.gateway.networking.k8s.io
Expand Down Expand Up @@ -3399,7 +3399,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1923
gateway.networking.k8s.io/bundle-version: v0.7.0-rc1
gateway.networking.k8s.io/bundle-version: v0.7.0
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: httproutes.gateway.networking.k8s.io
Expand Down Expand Up @@ -3976,8 +3976,17 @@ spec:
port:
description: "Port is the port to be used in
the value of the `Location` header in the
response. \n When empty, the Gateway Listener
port is used. \n Implementations SHOULD NOT
response. \n If no port is specified, the
redirect port MUST be derived using the following
rules: \n * If redirect scheme is not-empty,
the redirect port MUST be the well-known port
associated with the redirect scheme. Specifically
\"http\" to port 80 and \"https\" to port
443. If the redirect scheme does not have
a well-known port, the listener port of the
Gateway SHOULD be used. * If redirect scheme
is empty, the redirect port MUST be the Gateway
Listener port. \n Implementations SHOULD NOT
add the port number in the 'Location' header
in the following cases: \n * A Location header
that will use HTTP (whether that is determined
Expand All @@ -3994,8 +4003,11 @@ spec:
description: "Scheme is the scheme to be used
in the value of the `Location` header in the
response. When empty, the scheme of the request
is used. \n Note that values may be added
to this enum, implementations must ensure
is used. \n Scheme redirects can affect the
port of the redirect, for more information,
refer to the documentation for the port field
of this filter. \n Note that values may be
added to this enum, implementations must ensure
that unknown values will not cause a crash.
\n Unknown values here must result in the
implementation setting the Accepted Condition
Expand Down Expand Up @@ -4617,16 +4629,24 @@ spec:
type: object
port:
description: "Port is the port to be used in the value
of the `Location` header in the response. \n When
empty, the Gateway Listener port is used. \n Implementations
SHOULD NOT add the port number in the 'Location'
header in the following cases: \n * A Location header
that will use HTTP (whether that is determined via
the Listener protocol or the Scheme field) _and_
use port 80. * A Location header that will use HTTPS
(whether that is determined via the Listener protocol
or the Scheme field) _and_ use port 443. \n Support:
Extended"
of the `Location` header in the response. \n If
no port is specified, the redirect port MUST be
derived using the following rules: \n * If redirect
scheme is not-empty, the redirect port MUST be the
well-known port associated with the redirect scheme.
Specifically \"http\" to port 80 and \"https\" to
port 443. If the redirect scheme does not have a
well-known port, the listener port of the Gateway
SHOULD be used. * If redirect scheme is empty, the
redirect port MUST be the Gateway Listener port.
\n Implementations SHOULD NOT add the port number
in the 'Location' header in the following cases:
\n * A Location header that will use HTTP (whether
that is determined via the Listener protocol or
the Scheme field) _and_ use port 80. * A Location
header that will use HTTPS (whether that is determined
via the Listener protocol or the Scheme field) _and_
use port 443. \n Support: Extended"
format: int32
maximum: 65535
minimum: 1
Expand All @@ -4635,7 +4655,10 @@ spec:
description: "Scheme is the scheme to be used in the
value of the `Location` header in the response.
When empty, the scheme of the request is used. \n
Note that values may be added to this enum, implementations
Scheme redirects can affect the port of the redirect,
for more information, refer to the documentation
for the port field of this filter. \n Note that
values may be added to this enum, implementations
must ensure that unknown values will not cause a
crash. \n Unknown values here must result in the
implementation setting the Accepted Condition for
Expand Down Expand Up @@ -5871,8 +5894,17 @@ spec:
port:
description: "Port is the port to be used in
the value of the `Location` header in the
response. \n When empty, the Gateway Listener
port is used. \n Implementations SHOULD NOT
response. \n If no port is specified, the
redirect port MUST be derived using the following
rules: \n * If redirect scheme is not-empty,
the redirect port MUST be the well-known port
associated with the redirect scheme. Specifically
\"http\" to port 80 and \"https\" to port
443. If the redirect scheme does not have
a well-known port, the listener port of the
Gateway SHOULD be used. * If redirect scheme
is empty, the redirect port MUST be the Gateway
Listener port. \n Implementations SHOULD NOT
add the port number in the 'Location' header
in the following cases: \n * A Location header
that will use HTTP (whether that is determined
Expand All @@ -5889,8 +5921,11 @@ spec:
description: "Scheme is the scheme to be used
in the value of the `Location` header in the
response. When empty, the scheme of the request
is used. \n Note that values may be added
to this enum, implementations must ensure
is used. \n Scheme redirects can affect the
port of the redirect, for more information,
refer to the documentation for the port field
of this filter. \n Note that values may be
added to this enum, implementations must ensure
that unknown values will not cause a crash.
\n Unknown values here must result in the
implementation setting the Accepted Condition
Expand Down Expand Up @@ -6512,16 +6547,24 @@ spec:
type: object
port:
description: "Port is the port to be used in the value
of the `Location` header in the response. \n When
empty, the Gateway Listener port is used. \n Implementations
SHOULD NOT add the port number in the 'Location'
header in the following cases: \n * A Location header
that will use HTTP (whether that is determined via
the Listener protocol or the Scheme field) _and_
use port 80. * A Location header that will use HTTPS
(whether that is determined via the Listener protocol
or the Scheme field) _and_ use port 443. \n Support:
Extended"
of the `Location` header in the response. \n If
no port is specified, the redirect port MUST be
derived using the following rules: \n * If redirect
scheme is not-empty, the redirect port MUST be the
well-known port associated with the redirect scheme.
Specifically \"http\" to port 80 and \"https\" to
port 443. If the redirect scheme does not have a
well-known port, the listener port of the Gateway
SHOULD be used. * If redirect scheme is empty, the
redirect port MUST be the Gateway Listener port.
\n Implementations SHOULD NOT add the port number
in the 'Location' header in the following cases:
\n * A Location header that will use HTTP (whether
that is determined via the Listener protocol or
the Scheme field) _and_ use port 80. * A Location
header that will use HTTPS (whether that is determined
via the Listener protocol or the Scheme field) _and_
use port 443. \n Support: Extended"
format: int32
maximum: 65535
minimum: 1
Expand All @@ -6530,7 +6573,10 @@ spec:
description: "Scheme is the scheme to be used in the
value of the `Location` header in the response.
When empty, the scheme of the request is used. \n
Note that values may be added to this enum, implementations
Scheme redirects can affect the port of the redirect,
for more information, refer to the documentation
for the port field of this filter. \n Note that
values may be added to this enum, implementations
must ensure that unknown values will not cause a
crash. \n Unknown values here must result in the
implementation setting the Accepted Condition for
Expand Down Expand Up @@ -7222,7 +7268,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1923
gateway.networking.k8s.io/bundle-version: v0.7.0-rc1
gateway.networking.k8s.io/bundle-version: v0.7.0
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: referencegrants.gateway.networking.k8s.io
Expand Down Expand Up @@ -7504,7 +7550,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1923
gateway.networking.k8s.io/bundle-version: v0.7.0-rc1
gateway.networking.k8s.io/bundle-version: v0.7.0
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: tcproutes.gateway.networking.k8s.io
Expand Down Expand Up @@ -8034,7 +8080,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1923
gateway.networking.k8s.io/bundle-version: v0.7.0-rc1
gateway.networking.k8s.io/bundle-version: v0.7.0
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: tlsroutes.gateway.networking.k8s.io
Expand Down Expand Up @@ -8613,7 +8659,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1923
gateway.networking.k8s.io/bundle-version: v0.7.0-rc1
gateway.networking.k8s.io/bundle-version: v0.7.0
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: udproutes.gateway.networking.k8s.io
Expand Down Expand Up @@ -9204,7 +9250,7 @@ spec:
spec:
containers:
- name: webhook
image: registry.k8s.io/gateway-api/admission-server:v0.7.0-rc1
image: registry.k8s.io/gateway-api/admission-server:v0.7.0
imagePullPolicy: Always
args:
- -logtostderr
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
k8s.io/kubectl v0.27.2
k8s.io/utils v0.0.0-20230209194617-a36077c30491
sigs.k8s.io/controller-runtime v0.15.0-beta.0
sigs.k8s.io/gateway-api v0.7.0-rc1
sigs.k8s.io/gateway-api v0.7.0
sigs.k8s.io/yaml v1.3.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/controller-runtime v0.15.0-beta.0 h1:pkhYMops8jZrVuI0kBHeF6q9UVu1JljIGGG4Ox5ZJmk=
sigs.k8s.io/controller-runtime v0.15.0-beta.0/go.mod h1:YUTa+du31rqOu4mJaijiuhGFax9ecCJgO/v0/yW09gE=
sigs.k8s.io/gateway-api v0.7.0-rc1 h1:dVUmLp5W4QBv9diU99ULf9n5v/incEmdVU98rkSa+7Y=
sigs.k8s.io/gateway-api v0.7.0-rc1/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso=
sigs.k8s.io/gateway-api v0.7.0 h1:/mG8yyJNBifqvuVLW5gwlI4CQs0NR/5q4BKUlf1bVdY=
sigs.k8s.io/gateway-api v0.7.0/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/kustomize/api v0.13.2 h1:kejWfLeJhUsTGioDoFNJET5LQe/ajzXhJGYoU+pJsiA=
Expand Down
33 changes: 7 additions & 26 deletions test/conformance/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import (
"sigs.k8s.io/gateway-api/conformance/utils/suite"
)

var useUniquePorts = flag.Bool("use-unique-ports", true, "whether to use unique ports")

func TestGatewayAPIConformance(t *testing.T) {
flag.Parse()

Expand All @@ -36,32 +34,15 @@ func TestGatewayAPIConformance(t *testing.T) {
require.NoError(t, v1alpha2.AddToScheme(client.Scheme()))
require.NoError(t, v1beta1.AddToScheme(client.Scheme()))

validUniqueListenerPorts := []v1alpha2.PortNumber{
v1alpha2.PortNumber(int32(80)),
v1alpha2.PortNumber(int32(81)),
v1alpha2.PortNumber(int32(82)),
v1alpha2.PortNumber(int32(83)),
}

if !*useUniquePorts {
validUniqueListenerPorts = []v1alpha2.PortNumber{}
}

cSuite := suite.New(suite.Options{
Client: client,
GatewayClassName: *flags.GatewayClassName,
Debug: *flags.ShowDebug,
CleanupBaseResources: *flags.CleanupBaseResources,
ValidUniqueListenerPorts: validUniqueListenerPorts,
SupportedFeatures: suite.AllFeatures,
ExemptFeatures: suite.MeshCoreFeatures,
Client: client,
GatewayClassName: *flags.GatewayClassName,
Debug: *flags.ShowDebug,
CleanupBaseResources: *flags.CleanupBaseResources,
SupportedFeatures: suite.AllFeatures,
ExemptFeatures: suite.MeshCoreFeatures,
SkipTests: []string{
// Remove once https://github.com/envoyproxy/gateway/issues/993 is fixed
tests.HTTPRouteRedirectPath.ShortName,
// Remove once https://github.com/envoyproxy/gateway/issues/992 is fixed
tests.HTTPRouteRedirectHostAndStatus.ShortName,
// Remove once https://github.com/envoyproxy/gateway/issues/994 is fixed
tests.HTTPRouteRedirectScheme.ShortName,
tests.HTTPRouteRedirectPortAndScheme.ShortName,
},
})
cSuite.Setup(t)
Expand Down
Loading