diff --git a/apis/v1beta1/validation/gateway_test.go b/apis/v1beta1/validation/gateway_test.go index 0feaec2627..533c4e97f4 100644 --- a/apis/v1beta1/validation/gateway_test.go +++ b/apis/v1beta1/validation/gateway_test.go @@ -237,7 +237,7 @@ func TestValidateGateway(t *testing.T) { }, }, }, - "combination of port and protocol are not unique for each listenr when hostnames not set": { + "combination of port and protocol are not unique for each listener when hostnames not set": { mutate: func(gw *gatewayv1b1.Gateway) { gw.Spec.Listeners[0].Name = "foo" gw.Spec.Listeners[0].Protocol = gatewayv1b1.HTTPProtocolType diff --git a/conformance/base/manifests.yaml b/conformance/base/manifests.yaml index 7087aec109..674710bc03 100644 --- a/conformance/base/manifests.yaml +++ b/conformance/base/manifests.yaml @@ -30,21 +30,6 @@ spec: --- apiVersion: gateway.networking.k8s.io/v1beta1 kind: Gateway -metadata: - name: same-namespace-with-http-listener-on-8080 - namespace: gateway-conformance-infra -spec: - gatewayClassName: "{GATEWAY_CLASS_NAME}" - listeners: - - name: http - port: 8080 - protocol: HTTP - allowedRoutes: - namespaces: - from: Same ---- -apiVersion: gateway.networking.k8s.io/v1beta1 -kind: Gateway metadata: name: same-namespace-with-https-listener namespace: gateway-conformance-infra diff --git a/conformance/tests/gateway-observed-generation-bump.go b/conformance/tests/gateway-observed-generation-bump.go index 60bff936e0..e1ccc07c5c 100644 --- a/conformance/tests/gateway-observed-generation-bump.go +++ b/conformance/tests/gateway-observed-generation-bump.go @@ -39,6 +39,7 @@ var GatewayObservedGenerationBump = suite.ConformanceTest{ Description: "A Gateway in the gateway-conformance-infra namespace should update the observedGeneration in all of its Status.Conditions after an update to the spec", Features: []suite.SupportedFeature{ suite.SupportGateway, + suite.SupportGatewayPort8080, }, Manifests: []string{"tests/gateway-observed-generation-bump.yaml"}, Test: func(t *testing.T, s *suite.ConformanceTestSuite) { diff --git a/conformance/tests/httproute-redirect-port-and-scheme.go b/conformance/tests/httproute-redirect-port-and-scheme.go index d9a1d6fd82..17ee173245 100644 --- a/conformance/tests/httproute-redirect-port-and-scheme.go +++ b/conformance/tests/httproute-redirect-port-and-scheme.go @@ -40,6 +40,7 @@ var HTTPRouteRedirectPortAndScheme = suite.ConformanceTest{ suite.SupportGateway, suite.SupportHTTPRoute, suite.SupportHTTPRoutePortRedirect, + suite.SupportGatewayPort8080, }, Test: func(t *testing.T, suite *suite.ConformanceTestSuite) { ns := "gateway-conformance-infra" diff --git a/conformance/tests/httproute-redirect-port-and-scheme.yaml b/conformance/tests/httproute-redirect-port-and-scheme.yaml index 6b1f3526c0..1b6d72cd01 100644 --- a/conformance/tests/httproute-redirect-port-and-scheme.yaml +++ b/conformance/tests/httproute-redirect-port-and-scheme.yaml @@ -1,4 +1,19 @@ apiVersion: gateway.networking.k8s.io/v1beta1 +kind: Gateway +metadata: + name: same-namespace-with-http-listener-on-8080 + namespace: gateway-conformance-infra +spec: + gatewayClassName: "{GATEWAY_CLASS_NAME}" + listeners: + - name: http + port: 8080 + protocol: HTTP + allowedRoutes: + namespaces: + from: Same +--- +apiVersion: gateway.networking.k8s.io/v1beta1 kind: HTTPRoute metadata: name: http-route-for-listener-on-port-80 diff --git a/conformance/utils/suite/features.go b/conformance/utils/suite/features.go index 3e0da97bd1..06c8e49e89 100644 --- a/conformance/utils/suite/features.go +++ b/conformance/utils/suite/features.go @@ -64,6 +64,8 @@ const ( // // See: https://github.com/kubernetes-sigs/gateway-api/issues/1780 SupportGatewayClassObservedGenerationBump SupportedFeature = "GatewayClassObservedGenerationBump" + // This option indicates that the Gateway can also use port 8080 + SupportGatewayPort8080 SupportedFeature = "GatewayPort8080" ) // StandardExtendedFeatures are extra generic features that implementations may @@ -73,6 +75,7 @@ const ( // See: https://github.com/kubernetes-sigs/gateway-api/issues/1891 var StandardExtendedFeatures = sets.New( SupportGatewayClassObservedGenerationBump, + SupportGatewayPort8080, ).Insert(StandardCoreFeatures.UnsortedList()...) // -----------------------------------------------------------------------------