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

Add SupportedFeature for port 8080 on Gateway #2184

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: 1 addition & 1 deletion apis/v1beta1/validation/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 0 additions & 15 deletions conformance/base/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions conformance/tests/gateway-observed-generation-bump.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions conformance/tests/httproute-redirect-port-and-scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions conformance/tests/httproute-redirect-port-and-scheme.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions conformance/utils/suite/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not 100% sure if it should be added to this section - open to suggestions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, thanks!

)

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

// -----------------------------------------------------------------------------
Expand Down