Skip to content

Commit 2d8d51c

Browse files
authored
Merge pull request #2184 from xtineskim/gateway-port-8080-supportedfeatures
Add SupportedFeature for port 8080 on Gateway
2 parents 358cf71 + 316e360 commit 2d8d51c

File tree

6 files changed

+21
-16
lines changed

6 files changed

+21
-16
lines changed

apis/v1beta1/validation/gateway_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func TestValidateGateway(t *testing.T) {
237237
},
238238
},
239239
},
240-
"combination of port and protocol are not unique for each listenr when hostnames not set": {
240+
"combination of port and protocol are not unique for each listener when hostnames not set": {
241241
mutate: func(gw *gatewayv1b1.Gateway) {
242242
gw.Spec.Listeners[0].Name = "foo"
243243
gw.Spec.Listeners[0].Protocol = gatewayv1b1.HTTPProtocolType

conformance/base/manifests.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,6 @@ spec:
3030
---
3131
apiVersion: gateway.networking.k8s.io/v1beta1
3232
kind: Gateway
33-
metadata:
34-
name: same-namespace-with-http-listener-on-8080
35-
namespace: gateway-conformance-infra
36-
spec:
37-
gatewayClassName: "{GATEWAY_CLASS_NAME}"
38-
listeners:
39-
- name: http
40-
port: 8080
41-
protocol: HTTP
42-
allowedRoutes:
43-
namespaces:
44-
from: Same
45-
---
46-
apiVersion: gateway.networking.k8s.io/v1beta1
47-
kind: Gateway
4833
metadata:
4934
name: same-namespace-with-https-listener
5035
namespace: gateway-conformance-infra

conformance/tests/gateway-observed-generation-bump.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ var GatewayObservedGenerationBump = suite.ConformanceTest{
3939
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",
4040
Features: []suite.SupportedFeature{
4141
suite.SupportGateway,
42+
suite.SupportGatewayPort8080,
4243
},
4344
Manifests: []string{"tests/gateway-observed-generation-bump.yaml"},
4445
Test: func(t *testing.T, s *suite.ConformanceTestSuite) {

conformance/tests/httproute-redirect-port-and-scheme.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var HTTPRouteRedirectPortAndScheme = suite.ConformanceTest{
4040
suite.SupportGateway,
4141
suite.SupportHTTPRoute,
4242
suite.SupportHTTPRoutePortRedirect,
43+
suite.SupportGatewayPort8080,
4344
},
4445
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {
4546
ns := "gateway-conformance-infra"

conformance/tests/httproute-redirect-port-and-scheme.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
apiVersion: gateway.networking.k8s.io/v1beta1
2+
kind: Gateway
3+
metadata:
4+
name: same-namespace-with-http-listener-on-8080
5+
namespace: gateway-conformance-infra
6+
spec:
7+
gatewayClassName: "{GATEWAY_CLASS_NAME}"
8+
listeners:
9+
- name: http
10+
port: 8080
11+
protocol: HTTP
12+
allowedRoutes:
13+
namespaces:
14+
from: Same
15+
---
16+
apiVersion: gateway.networking.k8s.io/v1beta1
217
kind: HTTPRoute
318
metadata:
419
name: http-route-for-listener-on-port-80

conformance/utils/suite/features.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ const (
6464
//
6565
// See: https://github.com/kubernetes-sigs/gateway-api/issues/1780
6666
SupportGatewayClassObservedGenerationBump SupportedFeature = "GatewayClassObservedGenerationBump"
67+
// This option indicates that the Gateway can also use port 8080
68+
SupportGatewayPort8080 SupportedFeature = "GatewayPort8080"
6769
)
6870

6971
// StandardExtendedFeatures are extra generic features that implementations may
@@ -73,6 +75,7 @@ const (
7375
// See: https://github.com/kubernetes-sigs/gateway-api/issues/1891
7476
var StandardExtendedFeatures = sets.New(
7577
SupportGatewayClassObservedGenerationBump,
78+
SupportGatewayPort8080,
7679
).Insert(StandardCoreFeatures.UnsortedList()...)
7780

7881
// -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)