diff --git a/conformance/tests/gateway-http-listener-isolation.go b/conformance/tests/gateway-http-listener-isolation.go index ce42db77ca..f2cfc4b624 100644 --- a/conformance/tests/gateway-http-listener-isolation.go +++ b/conformance/tests/gateway-http-listener-isolation.go @@ -34,7 +34,7 @@ func init() { var GatewayHTTPListenerIsolation = suite.ConformanceTest{ ShortName: "GatewayHTTPListenerIsolation", Description: "Listener isolation for HTTP listeners with multiple listeners and HTTPRoutes", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportGatewayHTTPListenerIsolation, features.SupportHTTPRoute, diff --git a/conformance/tests/gateway-infrastructure.go b/conformance/tests/gateway-infrastructure.go index 6712209bbc..5fc79bd1a1 100644 --- a/conformance/tests/gateway-infrastructure.go +++ b/conformance/tests/gateway-infrastructure.go @@ -39,7 +39,7 @@ func init() { var GatewayInfrastructure = suite.ConformanceTest{ ShortName: "GatewayInfrastructure", Description: "Propagation of metadata from Gateway infrastructure to generated components", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportGatewayInfrastructurePropagation, }, diff --git a/conformance/tests/gateway-invalid-route-kind.go b/conformance/tests/gateway-invalid-route-kind.go index 8bde34a5a0..fbd5447685 100644 --- a/conformance/tests/gateway-invalid-route-kind.go +++ b/conformance/tests/gateway-invalid-route-kind.go @@ -35,7 +35,7 @@ func init() { var GatewayInvalidRouteKind = suite.ConformanceTest{ ShortName: "GatewayInvalidRouteKind", Description: "A Gateway in the gateway-conformance-infra namespace should fail to become ready an invalid Route kind is specified.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, }, Manifests: []string{"tests/gateway-invalid-route-kind.yaml"}, diff --git a/conformance/tests/gateway-invalid-tls-configuration.go b/conformance/tests/gateway-invalid-tls-configuration.go index 2a26e16cbf..c48fe03d86 100644 --- a/conformance/tests/gateway-invalid-tls-configuration.go +++ b/conformance/tests/gateway-invalid-tls-configuration.go @@ -35,7 +35,7 @@ func init() { var GatewayInvalidTLSConfiguration = suite.ConformanceTest{ ShortName: "GatewayInvalidTLSConfiguration", Description: "A Gateway should fail to become ready if the Gateway has an invalid TLS configuration", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, }, Manifests: []string{"tests/gateway-invalid-tls-configuration.yaml"}, diff --git a/conformance/tests/gateway-modify-listeners.go b/conformance/tests/gateway-modify-listeners.go index 0bdac3b8aa..f36e80a2f5 100644 --- a/conformance/tests/gateway-modify-listeners.go +++ b/conformance/tests/gateway-modify-listeners.go @@ -38,7 +38,7 @@ func init() { var GatewayModifyListeners = suite.ConformanceTest{ ShortName: "GatewayModifyListeners", Description: "A Gateway in the gateway-conformance-infra namespace should handle adding and removing listeners.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, }, Manifests: []string{"tests/gateway-modify-listeners.yaml"}, diff --git a/conformance/tests/gateway-observed-generation-bump.go b/conformance/tests/gateway-observed-generation-bump.go index 537a96db0c..2edd63ef3b 100644 --- a/conformance/tests/gateway-observed-generation-bump.go +++ b/conformance/tests/gateway-observed-generation-bump.go @@ -38,7 +38,7 @@ func init() { var GatewayObservedGenerationBump = suite.ConformanceTest{ ShortName: "GatewayObservedGenerationBump", 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: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, }, Manifests: []string{"tests/gateway-observed-generation-bump.yaml"}, diff --git a/conformance/tests/gateway-secret-invalid-reference-grant.go b/conformance/tests/gateway-secret-invalid-reference-grant.go index d2a764104b..2820545eca 100644 --- a/conformance/tests/gateway-secret-invalid-reference-grant.go +++ b/conformance/tests/gateway-secret-invalid-reference-grant.go @@ -35,7 +35,7 @@ func init() { var GatewaySecretInvalidReferenceGrant = suite.ConformanceTest{ ShortName: "GatewaySecretInvalidReferenceGrant", Description: "A Gateway in the gateway-conformance-infra namespace should fail to become ready if the Gateway has a certificateRef for a Secret in the gateway-conformance-web-backend namespace and a ReferenceGrant exists but does not grant permission to that specific Secret", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportReferenceGrant, }, diff --git a/conformance/tests/gateway-secret-missing-reference-grant.go b/conformance/tests/gateway-secret-missing-reference-grant.go index 9e4058fda5..550bdd387b 100644 --- a/conformance/tests/gateway-secret-missing-reference-grant.go +++ b/conformance/tests/gateway-secret-missing-reference-grant.go @@ -35,7 +35,7 @@ func init() { var GatewaySecretMissingReferenceGrant = suite.ConformanceTest{ ShortName: "GatewaySecretMissingReferenceGrant", Description: "A Gateway in the gateway-conformance-infra namespace should fail to become programmed if the Gateway has a certificateRef for a Secret in the gateway-conformance-web-backend namespace and a ReferenceGrant granting permission to the Secret does not exist", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportReferenceGrant, }, diff --git a/conformance/tests/gateway-secret-reference-grant-all-in-namespace.go b/conformance/tests/gateway-secret-reference-grant-all-in-namespace.go index 198dd4412d..f6ca5cac88 100644 --- a/conformance/tests/gateway-secret-reference-grant-all-in-namespace.go +++ b/conformance/tests/gateway-secret-reference-grant-all-in-namespace.go @@ -35,7 +35,7 @@ func init() { var GatewaySecretReferenceGrantAllInNamespace = suite.ConformanceTest{ ShortName: "GatewaySecretReferenceGrantAllInNamespace", Description: "A Gateway in the gateway-conformance-infra namespace should become programmed if the Gateway has a certificateRef for a Secret in the gateway-conformance-web-backend namespace and a ReferenceGrant granting permission to all Secrets in the namespace exists", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportReferenceGrant, }, diff --git a/conformance/tests/gateway-secret-reference-grant-specific.go b/conformance/tests/gateway-secret-reference-grant-specific.go index 26067582f8..3e19c4991c 100644 --- a/conformance/tests/gateway-secret-reference-grant-specific.go +++ b/conformance/tests/gateway-secret-reference-grant-specific.go @@ -35,7 +35,7 @@ func init() { var GatewaySecretReferenceGrantSpecific = suite.ConformanceTest{ ShortName: "GatewaySecretReferenceGrantSpecific", Description: "A Gateway in the gateway-conformance-infra namespace should become programmed if the Gateway has a certificateRef for a Secret in the gateway-conformance-web-backend namespace and a ReferenceGrant granting permission to the specific Secret exists", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportReferenceGrant, }, diff --git a/conformance/tests/gateway-static-addresses.go b/conformance/tests/gateway-static-addresses.go index adb0e20061..150975dfa8 100644 --- a/conformance/tests/gateway-static-addresses.go +++ b/conformance/tests/gateway-static-addresses.go @@ -57,7 +57,7 @@ func init() { var GatewayStaticAddresses = suite.ConformanceTest{ ShortName: "GatewayStaticAddresses", Description: "A Gateway in the gateway-conformance-infra namespace should be able to use previously determined addresses.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportGatewayStaticAddresses, }, diff --git a/conformance/tests/gateway-with-attached-routes.go b/conformance/tests/gateway-with-attached-routes.go index f4e5c024ba..ce0e535e6a 100644 --- a/conformance/tests/gateway-with-attached-routes.go +++ b/conformance/tests/gateway-with-attached-routes.go @@ -35,7 +35,7 @@ func init() { var GatewayWithAttachedRoutes = suite.ConformanceTest{ ShortName: "GatewayWithAttachedRoutes", Description: "A Gateway in the gateway-conformance-infra namespace should be attached to routes.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, @@ -133,7 +133,7 @@ var GatewayWithAttachedRoutes = suite.ConformanceTest{ var GatewayWithAttachedRoutesWithPort8080 = suite.ConformanceTest{ ShortName: "GatewayWithAttachedRoutesWithPort8080", Description: "A Gateway in the gateway-conformance-infra namespace should be attached to routes.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportGatewayPort8080, features.SupportHTTPRoute, diff --git a/conformance/tests/gatewayclass-observed-generation-bump.go b/conformance/tests/gatewayclass-observed-generation-bump.go index 0e7143ef26..f188e3b8a8 100644 --- a/conformance/tests/gatewayclass-observed-generation-bump.go +++ b/conformance/tests/gatewayclass-observed-generation-bump.go @@ -36,7 +36,7 @@ func init() { var GatewayClassObservedGenerationBump = suite.ConformanceTest{ ShortName: "GatewayClassObservedGenerationBump", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, }, Description: "A GatewayClass should update the observedGeneration in all of it's Status.Conditions after an update to the spec", diff --git a/conformance/tests/grpcroute-exact-method-matching.go b/conformance/tests/grpcroute-exact-method-matching.go index 35152ed93f..384cf3ae02 100644 --- a/conformance/tests/grpcroute-exact-method-matching.go +++ b/conformance/tests/grpcroute-exact-method-matching.go @@ -38,7 +38,7 @@ var GRPCExactMethodMatching = suite.ConformanceTest{ ShortName: "GRPCExactMethodMatching", Description: "A single GRPCRoute with exact method matching for different backends", Manifests: []string{"tests/grpcroute-exact-method-matching.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportGRPCRoute, }, diff --git a/conformance/tests/grpcroute-header-matching.go b/conformance/tests/grpcroute-header-matching.go index 690efb47e8..48b6e0da66 100644 --- a/conformance/tests/grpcroute-header-matching.go +++ b/conformance/tests/grpcroute-header-matching.go @@ -38,7 +38,7 @@ var GRPCRouteHeaderMatching = suite.ConformanceTest{ ShortName: "GRPCRouteHeaderMatching", Description: "A single GRPCRoute with header matching for different backends", Manifests: []string{"tests/grpcroute-header-matching.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportGRPCRoute, }, diff --git a/conformance/tests/grpcroute-listener-hostname-matching.go b/conformance/tests/grpcroute-listener-hostname-matching.go index 851c35789d..0e0492e764 100644 --- a/conformance/tests/grpcroute-listener-hostname-matching.go +++ b/conformance/tests/grpcroute-listener-hostname-matching.go @@ -38,7 +38,7 @@ var GRPCRouteListenerHostnameMatching = suite.ConformanceTest{ ShortName: "GRPCRouteListenerHostnameMatching", Description: "Multiple GRPC listeners with the same port and different hostnames, each with a different GRPCRoute", Manifests: []string{"tests/grpcroute-listener-hostname-matching.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportGRPCRoute, }, diff --git a/conformance/tests/httproute-backend-protocol-h2c.go b/conformance/tests/httproute-backend-protocol-h2c.go index 88cc0b06f4..e77798ffe6 100644 --- a/conformance/tests/httproute-backend-protocol-h2c.go +++ b/conformance/tests/httproute-backend-protocol-h2c.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteBackendProtocolH2C = suite.ConformanceTest{ ShortName: "HTTPRouteBackendProtocolH2C", Description: "A HTTPRoute with a BackendRef that has an appProtocol kubernetes.io/h2c should be functional", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteBackendProtocolH2C, diff --git a/conformance/tests/httproute-backend-protocol-websocket.go b/conformance/tests/httproute-backend-protocol-websocket.go index 3e63fb4987..93ff140708 100644 --- a/conformance/tests/httproute-backend-protocol-websocket.go +++ b/conformance/tests/httproute-backend-protocol-websocket.go @@ -40,7 +40,7 @@ func init() { var HTTPRouteBackendProtocolWebSocket = suite.ConformanceTest{ ShortName: "HTTPRouteBackendProtocolWebSocket", Description: "A HTTPRoute with a BackendRef that has an appProtocol kubernetes.io/ws should be functional", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteBackendProtocolWebSocket, diff --git a/conformance/tests/httproute-cross-namespace.go b/conformance/tests/httproute-cross-namespace.go index 1f43b283c0..edabac2a72 100644 --- a/conformance/tests/httproute-cross-namespace.go +++ b/conformance/tests/httproute-cross-namespace.go @@ -34,7 +34,7 @@ func init() { var HTTPRouteCrossNamespace = suite.ConformanceTest{ ShortName: "HTTPRouteCrossNamespace", Description: "A single HTTPRoute in the gateway-conformance-web-backend namespace should attach to Gateway in another namespace", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-disallowed-kind.go b/conformance/tests/httproute-disallowed-kind.go index 972f3a9391..be421d760e 100644 --- a/conformance/tests/httproute-disallowed-kind.go +++ b/conformance/tests/httproute-disallowed-kind.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteDisallowedKind = suite.ConformanceTest{ ShortName: "HTTPRouteDisallowedKind", Description: "A single HTTPRoute in the gateway-conformance-infra namespace should fail to attach to a Gateway with no listeners that allow the HTTPRoute kind", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportTLSRoute, diff --git a/conformance/tests/httproute-exact-path-matching.go b/conformance/tests/httproute-exact-path-matching.go index 706bcaac23..b2f1c0d075 100644 --- a/conformance/tests/httproute-exact-path-matching.go +++ b/conformance/tests/httproute-exact-path-matching.go @@ -34,7 +34,7 @@ func init() { var HTTPRouteExactPathMatching = suite.ConformanceTest{ ShortName: "HTTPRouteExactPathMatching", Description: "A single HTTPRoute with exact path matching for different backends", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-header-matching.go b/conformance/tests/httproute-header-matching.go index 29a0f5d151..cb72e972cf 100644 --- a/conformance/tests/httproute-header-matching.go +++ b/conformance/tests/httproute-header-matching.go @@ -34,7 +34,7 @@ func init() { var HTTPRouteHeaderMatching = suite.ConformanceTest{ ShortName: "HTTPRouteHeaderMatching", Description: "A single HTTPRoute with header matching for different backends", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-hostname-intersection.go b/conformance/tests/httproute-hostname-intersection.go index 0528fa622c..0ad358f9b7 100644 --- a/conformance/tests/httproute-hostname-intersection.go +++ b/conformance/tests/httproute-hostname-intersection.go @@ -36,7 +36,7 @@ func init() { var HTTPRouteHostnameIntersection = suite.ConformanceTest{ ShortName: "HTTPRouteHostnameIntersection", Description: "HTTPRoutes should attach to listeners only if they have intersecting hostnames, and should accept requests only for the intersecting hostnames", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-https-listener.go b/conformance/tests/httproute-https-listener.go index 3198392955..5b60011431 100644 --- a/conformance/tests/httproute-https-listener.go +++ b/conformance/tests/httproute-https-listener.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteHTTPSListener = suite.ConformanceTest{ ShortName: "HTTPRouteHTTPSListener", Description: "HTTPRoute attaches to a Gateway's HTTPS listener in the same namespace", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-invalid-backendref-unknown-kind.go b/conformance/tests/httproute-invalid-backendref-unknown-kind.go index 43aa4c268a..468252044c 100644 --- a/conformance/tests/httproute-invalid-backendref-unknown-kind.go +++ b/conformance/tests/httproute-invalid-backendref-unknown-kind.go @@ -36,7 +36,7 @@ func init() { var HTTPRouteInvalidBackendRefUnknownKind = suite.ConformanceTest{ ShortName: "HTTPRouteInvalidBackendRefUnknownKind", Description: "A single HTTPRoute in the gateway-conformance-infra namespace should set a ResolvedRefs status False with reason InvalidKind when attempting to bind to a Gateway in the same namespace if the route has a BackendRef that points to an unknown Kind.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-invalid-cross-namespace-backend-ref.go b/conformance/tests/httproute-invalid-cross-namespace-backend-ref.go index e0d17d3b28..7e83c6f052 100644 --- a/conformance/tests/httproute-invalid-cross-namespace-backend-ref.go +++ b/conformance/tests/httproute-invalid-cross-namespace-backend-ref.go @@ -36,7 +36,7 @@ func init() { var HTTPRouteInvalidCrossNamespaceBackendRef = suite.ConformanceTest{ ShortName: "HTTPRouteInvalidCrossNamespaceBackendRef", Description: "A single HTTPRoute in the gateway-conformance-infra namespace should set a ResolvedRefs status False with reason RefNotPermitted when attempting to bind to a Gateway in the same namespace if the route has a BackendRef Service in the gateway-conformance-web-backend namespace and a ReferenceGrant granting permission to route to that Service does not exist", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportReferenceGrant, diff --git a/conformance/tests/httproute-invalid-cross-namespace-parent-ref.go b/conformance/tests/httproute-invalid-cross-namespace-parent-ref.go index 968000221c..d62d50ef80 100644 --- a/conformance/tests/httproute-invalid-cross-namespace-parent-ref.go +++ b/conformance/tests/httproute-invalid-cross-namespace-parent-ref.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteInvalidCrossNamespaceParentRef = suite.ConformanceTest{ ShortName: "HTTPRouteInvalidCrossNamespaceParentRef", Description: "A single HTTPRoute in the gateway-conformance-web-backend namespace should fail to attach to a Gateway in another namespace that it is not allowed to", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-invalid-nonexistent-backendref.go b/conformance/tests/httproute-invalid-nonexistent-backendref.go index a6033e9a7d..52807e3f14 100644 --- a/conformance/tests/httproute-invalid-nonexistent-backendref.go +++ b/conformance/tests/httproute-invalid-nonexistent-backendref.go @@ -36,7 +36,7 @@ func init() { var HTTPRouteInvalidNonExistentBackendRef = suite.ConformanceTest{ ShortName: "HTTPRouteInvalidNonExistentBackendRef", Description: "A single HTTPRoute in the gateway-conformance-infra namespace should set a ResolvedRefs status False with reason BackendNotFound and return 500 when binding to a Gateway in the same namespace if the route has a BackendRef Service that does not exist", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-invalid-parentref-not-matching-listener-port.go b/conformance/tests/httproute-invalid-parentref-not-matching-listener-port.go index a353bcb6e4..2bee3d082d 100644 --- a/conformance/tests/httproute-invalid-parentref-not-matching-listener-port.go +++ b/conformance/tests/httproute-invalid-parentref-not-matching-listener-port.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteInvalidParentRefNotMatchingListenerPort = suite.ConformanceTest{ ShortName: "HTTPRouteInvalidParentRefNotMatchingListenerPort", Description: "A single HTTPRoute in the gateway-conformance-infra namespace should set the Accepted status to False with reason NoMatchingParent when attempting to bind to a Gateway that does not have a matching ListenerPort.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteDestinationPortMatching, diff --git a/conformance/tests/httproute-invalid-parentref-not-matching-section-name.go b/conformance/tests/httproute-invalid-parentref-not-matching-section-name.go index 36db8a5941..6b70ed172e 100644 --- a/conformance/tests/httproute-invalid-parentref-not-matching-section-name.go +++ b/conformance/tests/httproute-invalid-parentref-not-matching-section-name.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteInvalidParentRefNotMatchingSectionName = suite.ConformanceTest{ ShortName: "HTTPRouteInvalidParentRefNotMatchingSectionName", Description: "A single HTTPRoute in the gateway-conformance-infra namespace should set the Accepted status to False with reason NoMatchingParent when attempting to bind to a Gateway that does not have a matching SectionName.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-invalid-parentref-section-name-not-matching-port.go b/conformance/tests/httproute-invalid-parentref-section-name-not-matching-port.go index 25c4385841..bfc8b70d99 100644 --- a/conformance/tests/httproute-invalid-parentref-section-name-not-matching-port.go +++ b/conformance/tests/httproute-invalid-parentref-section-name-not-matching-port.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteInvalidParentRefSectionNameNotMatchingPort = suite.ConformanceTest{ ShortName: "HTTPRouteInvalidParentRefSectionNameNotMatchingPort", Description: "A single HTTPRoute in the gateway-conformance-infra namespace should set the Accepted status to False with reason NoMatchingParent when attempting to bind to a Gateway that SectionName does not match Port value.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteParentRefPort, diff --git a/conformance/tests/httproute-invalid-reference-grant.go b/conformance/tests/httproute-invalid-reference-grant.go index 66fa9f83c8..24971a69fa 100644 --- a/conformance/tests/httproute-invalid-reference-grant.go +++ b/conformance/tests/httproute-invalid-reference-grant.go @@ -36,7 +36,7 @@ func init() { var HTTPRouteInvalidReferenceGrant = suite.ConformanceTest{ ShortName: "HTTPRouteInvalidReferenceGrant", Description: "A single HTTPRoute in the gateway-conformance-infra namespace, with a backendRef in another namespace without valid ReferenceGrant, should have the ResolvedRefs condition set to False and not forward HTTP requests to any backend", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportReferenceGrant, diff --git a/conformance/tests/httproute-listener-hostname-matching.go b/conformance/tests/httproute-listener-hostname-matching.go index 51a1b355dc..4687018df0 100644 --- a/conformance/tests/httproute-listener-hostname-matching.go +++ b/conformance/tests/httproute-listener-hostname-matching.go @@ -34,7 +34,7 @@ func init() { var HTTPRouteListenerHostnameMatching = suite.ConformanceTest{ ShortName: "HTTPRouteListenerHostnameMatching", Description: "Multiple HTTP listeners with the same port and different hostnames, each with a different HTTPRoute", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-listener-port-matching.go b/conformance/tests/httproute-listener-port-matching.go index 281f40c7e6..59b85bf737 100644 --- a/conformance/tests/httproute-listener-port-matching.go +++ b/conformance/tests/httproute-listener-port-matching.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteListenerPortMatching = suite.ConformanceTest{ ShortName: "HTTPRouteListenerPortMatching", Description: "Multiple HTTP listeners with different ports, each with a different HTTPRoute", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteParentRefPort, diff --git a/conformance/tests/httproute-matching-across-routes.go b/conformance/tests/httproute-matching-across-routes.go index a0a60ba70a..c01f58ac1f 100644 --- a/conformance/tests/httproute-matching-across-routes.go +++ b/conformance/tests/httproute-matching-across-routes.go @@ -34,7 +34,7 @@ func init() { var HTTPRouteMatchingAcrossRoutes = suite.ConformanceTest{ ShortName: "HTTPRouteMatchingAcrossRoutes", Description: "Two HTTPRoutes with path matching for different backends", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-matching.go b/conformance/tests/httproute-matching.go index c0052c0788..0443bb3ef0 100644 --- a/conformance/tests/httproute-matching.go +++ b/conformance/tests/httproute-matching.go @@ -34,7 +34,7 @@ func init() { var HTTPRouteMatching = suite.ConformanceTest{ ShortName: "HTTPRouteMatching", Description: "A single HTTPRoute with path and header matching for different backends", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-method-matching.go b/conformance/tests/httproute-method-matching.go index 2499001501..d96be3531c 100644 --- a/conformance/tests/httproute-method-matching.go +++ b/conformance/tests/httproute-method-matching.go @@ -35,7 +35,7 @@ var HTTPRouteMethodMatching = suite.ConformanceTest{ ShortName: "HTTPRouteMethodMatching", Description: "A single HTTPRoute with method matching for different backends", Manifests: []string{"tests/httproute-method-matching.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteMethodMatching, diff --git a/conformance/tests/httproute-observed-generation-bump.go b/conformance/tests/httproute-observed-generation-bump.go index 51c1534c30..cdacf0dec5 100644 --- a/conformance/tests/httproute-observed-generation-bump.go +++ b/conformance/tests/httproute-observed-generation-bump.go @@ -38,7 +38,7 @@ func init() { var HTTPRouteObservedGenerationBump = suite.ConformanceTest{ ShortName: "HTTPRouteObservedGenerationBump", Description: "A HTTPRoute in the gateway-conformance-infra namespace should update the observedGeneration in all of it's Status.Conditions after an update to the spec", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-partially-invalid-via-invalid-reference-grant.go b/conformance/tests/httproute-partially-invalid-via-invalid-reference-grant.go index 247e995d12..795dbbe79e 100644 --- a/conformance/tests/httproute-partially-invalid-via-invalid-reference-grant.go +++ b/conformance/tests/httproute-partially-invalid-via-invalid-reference-grant.go @@ -36,7 +36,7 @@ func init() { var HTTPRoutePartiallyInvalidViaInvalidReferenceGrant = suite.ConformanceTest{ ShortName: "HTTPRoutePartiallyInvalidViaInvalidReferenceGrant", Description: "A single HTTPRoute in the gateway-conformance-infra namespace should attach to a Gateway in the same namespace if the route has a backendRef Service in the gateway-conformance-app-backend namespace and a ReferenceGrant exists but does not grant permission to route to that specific Service", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportReferenceGrant, diff --git a/conformance/tests/httproute-path-match-order.go b/conformance/tests/httproute-path-match-order.go index e2c5e4504d..78aed98ef8 100644 --- a/conformance/tests/httproute-path-match-order.go +++ b/conformance/tests/httproute-path-match-order.go @@ -34,7 +34,7 @@ func init() { var HTTPRoutePathMatchOrder = suite.ConformanceTest{ ShortName: "HTTPRoutePathMatchOrder", Description: "An HTTPRoute where there are multiple matches routing to any given backend follows match order precedence", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-query-param-matching.go b/conformance/tests/httproute-query-param-matching.go index a1fedcf1c9..2354dc6866 100644 --- a/conformance/tests/httproute-query-param-matching.go +++ b/conformance/tests/httproute-query-param-matching.go @@ -35,7 +35,7 @@ var HTTPRouteQueryParamMatching = suite.ConformanceTest{ ShortName: "HTTPRouteQueryParamMatching", Description: "A single HTTPRoute with query param matching for different backends", Manifests: []string{"tests/httproute-query-param-matching.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteQueryParamMatching, diff --git a/conformance/tests/httproute-redirect-host-and-status.go b/conformance/tests/httproute-redirect-host-and-status.go index 6972297198..1a06bbbede 100644 --- a/conformance/tests/httproute-redirect-host-and-status.go +++ b/conformance/tests/httproute-redirect-host-and-status.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteRedirectHostAndStatus = suite.ConformanceTest{ ShortName: "HTTPRouteRedirectHostAndStatus", Description: "An HTTPRoute with hostname and statusCode redirect filters", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-redirect-path.go b/conformance/tests/httproute-redirect-path.go index 15183b29cb..1b7968e2f4 100644 --- a/conformance/tests/httproute-redirect-path.go +++ b/conformance/tests/httproute-redirect-path.go @@ -36,7 +36,7 @@ var HTTPRouteRedirectPath = suite.ConformanceTest{ ShortName: "HTTPRouteRedirectPath", Description: "An HTTPRoute with scheme redirect filter", Manifests: []string{"tests/httproute-redirect-path.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRoutePathRedirect, diff --git a/conformance/tests/httproute-redirect-port-and-scheme.go b/conformance/tests/httproute-redirect-port-and-scheme.go index ab2b326e2f..d5e2478d6f 100644 --- a/conformance/tests/httproute-redirect-port-and-scheme.go +++ b/conformance/tests/httproute-redirect-port-and-scheme.go @@ -37,7 +37,7 @@ var HTTPRouteRedirectPortAndScheme = suite.ConformanceTest{ ShortName: "HTTPRouteRedirectPortAndScheme", Description: "An HTTPRoute with port and scheme redirect filter", Manifests: []string{"tests/httproute-redirect-port-and-scheme.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRoutePortRedirect, diff --git a/conformance/tests/httproute-redirect-port.go b/conformance/tests/httproute-redirect-port.go index 2a8369b38b..df52415ec4 100644 --- a/conformance/tests/httproute-redirect-port.go +++ b/conformance/tests/httproute-redirect-port.go @@ -36,7 +36,7 @@ var HTTPRouteRedirectPort = suite.ConformanceTest{ ShortName: "HTTPRouteRedirectPort", Description: "An HTTPRoute with a port redirect filter", Manifests: []string{"tests/httproute-redirect-port.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRoutePortRedirect, diff --git a/conformance/tests/httproute-redirect-scheme.go b/conformance/tests/httproute-redirect-scheme.go index ff37627548..576c15b3eb 100644 --- a/conformance/tests/httproute-redirect-scheme.go +++ b/conformance/tests/httproute-redirect-scheme.go @@ -36,7 +36,7 @@ var HTTPRouteRedirectScheme = suite.ConformanceTest{ ShortName: "HTTPRouteRedirectScheme", Description: "An HTTPRoute with a scheme redirect filter", Manifests: []string{"tests/httproute-redirect-scheme.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteSchemeRedirect, diff --git a/conformance/tests/httproute-reference-grant.go b/conformance/tests/httproute-reference-grant.go index d1b80939fe..ed66563f4a 100644 --- a/conformance/tests/httproute-reference-grant.go +++ b/conformance/tests/httproute-reference-grant.go @@ -38,7 +38,7 @@ func init() { var HTTPRouteReferenceGrant = suite.ConformanceTest{ ShortName: "HTTPRouteReferenceGrant", Description: "A single HTTPRoute in the gateway-conformance-infra namespace, with a backendRef in the gateway-conformance-web-backend namespace, should attach to Gateway in the gateway-conformance-infra namespace", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportReferenceGrant, diff --git a/conformance/tests/httproute-request-header-modifier.go b/conformance/tests/httproute-request-header-modifier.go index b7f4815689..228c132ca0 100644 --- a/conformance/tests/httproute-request-header-modifier.go +++ b/conformance/tests/httproute-request-header-modifier.go @@ -37,7 +37,7 @@ func init() { var HTTPRouteBackendRequestHeaderModifier = suite.ConformanceTest{ ShortName: "HTTPRouteBackendRequestHeaderModifier", Description: "An HTTPRoute backend has request header modifier filters applied correctly", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteBackendRequestHeaderModification, @@ -49,7 +49,7 @@ var HTTPRouteBackendRequestHeaderModifier = suite.ConformanceTest{ var HTTPRouteRequestHeaderModifier = suite.ConformanceTest{ ShortName: "HTTPRouteRequestHeaderModifier", Description: "An HTTPRoute has request header modifier filters applied correctly", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-request-mirror.go b/conformance/tests/httproute-request-mirror.go index fa4c36b44b..4620660bfe 100644 --- a/conformance/tests/httproute-request-mirror.go +++ b/conformance/tests/httproute-request-mirror.go @@ -35,7 +35,7 @@ var HTTPRouteRequestMirror = suite.ConformanceTest{ ShortName: "HTTPRouteRequestMirror", Description: "An HTTPRoute with request mirror filter", Manifests: []string{"tests/httproute-request-mirror.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteRequestMirror, diff --git a/conformance/tests/httproute-request-multiple-mirrors.go b/conformance/tests/httproute-request-multiple-mirrors.go index b7d324a894..0ea05b18ed 100644 --- a/conformance/tests/httproute-request-multiple-mirrors.go +++ b/conformance/tests/httproute-request-multiple-mirrors.go @@ -35,7 +35,7 @@ var HTTPRouteRequestMultipleMirrors = suite.ConformanceTest{ ShortName: "HTTPRouteRequestMultipleMirrors", Description: "An HTTPRoute with multiple request mirror filters", Manifests: []string{"tests/httproute-request-multiple-mirrors.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteRequestMirror, diff --git a/conformance/tests/httproute-response-header-modifier.go b/conformance/tests/httproute-response-header-modifier.go index 1d0f23cc88..0eab3d19bd 100644 --- a/conformance/tests/httproute-response-header-modifier.go +++ b/conformance/tests/httproute-response-header-modifier.go @@ -34,7 +34,7 @@ func init() { var HTTPRouteResponseHeaderModifier = suite.ConformanceTest{ ShortName: "HTTPRouteResponseHeaderModifier", Description: "An HTTPRoute has response header modifier filters applied correctly", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteResponseHeaderModification, diff --git a/conformance/tests/httproute-rewrite-host.go b/conformance/tests/httproute-rewrite-host.go index d0b383189e..db3085d017 100644 --- a/conformance/tests/httproute-rewrite-host.go +++ b/conformance/tests/httproute-rewrite-host.go @@ -35,7 +35,7 @@ var HTTPRouteRewriteHost = suite.ConformanceTest{ ShortName: "HTTPRouteRewriteHost", Description: "An HTTPRoute with hostname rewrite filter", Manifests: []string{"tests/httproute-rewrite-host.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteHostRewrite, diff --git a/conformance/tests/httproute-rewrite-path.go b/conformance/tests/httproute-rewrite-path.go index 0a64b9586d..c2d754633a 100644 --- a/conformance/tests/httproute-rewrite-path.go +++ b/conformance/tests/httproute-rewrite-path.go @@ -35,7 +35,7 @@ var HTTPRouteRewritePath = suite.ConformanceTest{ ShortName: "HTTPRouteRewritePath", Description: "An HTTPRoute with path rewrite filter", Manifests: []string{"tests/httproute-rewrite-path.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRoutePathRewrite, diff --git a/conformance/tests/httproute-service-types.go b/conformance/tests/httproute-service-types.go index 824db94ef4..b49e901578 100644 --- a/conformance/tests/httproute-service-types.go +++ b/conformance/tests/httproute-service-types.go @@ -44,7 +44,7 @@ func init() { var HTTPRouteServiceTypes = suite.ConformanceTest{ ShortName: "HTTPRouteServiceTypes", Description: "A single HTTPRoute should be able to route traffic to various service type backends", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-simple-same-namespace.go b/conformance/tests/httproute-simple-same-namespace.go index 7d970f8374..57ee680d91 100644 --- a/conformance/tests/httproute-simple-same-namespace.go +++ b/conformance/tests/httproute-simple-same-namespace.go @@ -35,7 +35,7 @@ func init() { var HTTPRouteSimpleSameNamespace = suite.ConformanceTest{ ShortName: "HTTPRouteSimpleSameNamespace", Description: "A single HTTPRoute in the gateway-conformance-infra namespace attaches to a Gateway in the same namespace", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/httproute-timeout-backend-request.go b/conformance/tests/httproute-timeout-backend-request.go index ad2c137589..2c60802eb6 100644 --- a/conformance/tests/httproute-timeout-backend-request.go +++ b/conformance/tests/httproute-timeout-backend-request.go @@ -39,7 +39,7 @@ var HTTPRouteTimeoutBackendRequest = suite.ConformanceTest{ ShortName: "HTTPRouteTimeoutBackendRequest", Description: "An HTTPRoute with backend request timeout", Manifests: []string{"tests/httproute-timeout-backend-request.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteBackendTimeout, diff --git a/conformance/tests/httproute-timeout-request.go b/conformance/tests/httproute-timeout-request.go index 731042ddb3..85202258d7 100644 --- a/conformance/tests/httproute-timeout-request.go +++ b/conformance/tests/httproute-timeout-request.go @@ -39,7 +39,7 @@ var HTTPRouteTimeoutRequest = suite.ConformanceTest{ ShortName: "HTTPRouteTimeoutRequest", Description: "An HTTPRoute with request timeout", Manifests: []string{"tests/httproute-timeout-request.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, features.SupportHTTPRouteRequestTimeout, diff --git a/conformance/tests/httproute-weight.go b/conformance/tests/httproute-weight.go index ad73000003..2a3e21afee 100644 --- a/conformance/tests/httproute-weight.go +++ b/conformance/tests/httproute-weight.go @@ -43,7 +43,7 @@ var HTTPRouteWeight = suite.ConformanceTest{ ShortName: "HTTPRouteWeight", Description: "An HTTPRoute with weighted backends", Manifests: []string{"tests/httproute-weight.yaml"}, - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, }, diff --git a/conformance/tests/mesh-basic.go b/conformance/tests/mesh-basic.go index ac57c4b96c..ad878f3a48 100644 --- a/conformance/tests/mesh-basic.go +++ b/conformance/tests/mesh-basic.go @@ -32,7 +32,7 @@ func init() { var MeshBasic = suite.ConformanceTest{ ShortName: "MeshBasic", Description: "A mesh client can communicate with a mesh server. This tests basic reachability with no configuration applied.", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportMesh, }, Manifests: []string{}, diff --git a/conformance/tests/mesh-consumer-route.go b/conformance/tests/mesh-consumer-route.go index f7189d7505..0bc4cfe522 100644 --- a/conformance/tests/mesh-consumer-route.go +++ b/conformance/tests/mesh-consumer-route.go @@ -32,7 +32,7 @@ func init() { var MeshConsumerRoute = suite.ConformanceTest{ ShortName: "MeshConsumerRoute", Description: "An HTTPRoute in a namespace other than its parentRef's namespace only affects requests from the route's namespace", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportMesh, features.SupportMeshConsumerRoute, features.SupportHTTPRoute, diff --git a/conformance/tests/mesh-frontend-hostname.go b/conformance/tests/mesh-frontend-hostname.go index e82cbcf53e..5d5e825e8a 100644 --- a/conformance/tests/mesh-frontend-hostname.go +++ b/conformance/tests/mesh-frontend-hostname.go @@ -32,7 +32,7 @@ func init() { var MeshFrontendHostname = suite.ConformanceTest{ ShortName: "MeshFrontendHostname", Description: "Mesh parentRef matches Service IP (not Host)", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportMesh, features.SupportMeshClusterIPMatching, features.SupportHTTPRoute, diff --git a/conformance/tests/mesh-frontend.go b/conformance/tests/mesh-frontend.go index bdb2998719..87b3c3437b 100644 --- a/conformance/tests/mesh-frontend.go +++ b/conformance/tests/mesh-frontend.go @@ -32,7 +32,7 @@ func init() { var MeshFrontend = suite.ConformanceTest{ ShortName: "MeshFrontend", Description: "Mesh rules should only apply to the associated frontend", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportMesh, features.SupportHTTPRoute, features.SupportHTTPRouteResponseHeaderModification, diff --git a/conformance/tests/mesh-ports.go b/conformance/tests/mesh-ports.go index 639b0d9436..67ebc21cef 100644 --- a/conformance/tests/mesh-ports.go +++ b/conformance/tests/mesh-ports.go @@ -32,7 +32,7 @@ func init() { var MeshPorts = suite.ConformanceTest{ ShortName: "MeshPorts", Description: "A mesh route can optionally configure 'port' in parentRef", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportMesh, features.SupportHTTPRoute, features.SupportHTTPRouteParentRefPort, diff --git a/conformance/tests/mesh-split.go b/conformance/tests/mesh-split.go index 5060c43683..0864bbe378 100644 --- a/conformance/tests/mesh-split.go +++ b/conformance/tests/mesh-split.go @@ -32,7 +32,7 @@ func init() { var MeshTrafficSplit = suite.ConformanceTest{ ShortName: "MeshTrafficSplit", Description: "A mesh client can send traffic to a Service which is split between two versions", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportMesh, features.SupportHTTPRoute, }, diff --git a/conformance/tests/tlsroute-invalid-reference-grant.go b/conformance/tests/tlsroute-invalid-reference-grant.go index a389fd02b5..f0a0cbd51c 100644 --- a/conformance/tests/tlsroute-invalid-reference-grant.go +++ b/conformance/tests/tlsroute-invalid-reference-grant.go @@ -35,7 +35,7 @@ func init() { var TLSRouteInvalidReferenceGrant = suite.ConformanceTest{ ShortName: "TLSRouteInvalidReferenceGrant", Description: "A single TLSRoute in the gateway-conformance-infra namespace, with a backendRef in another namespace without valid ReferenceGrant, should have the ResolvedRefs condition set to False", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportTLSRoute, features.SupportReferenceGrant, diff --git a/conformance/tests/tlsroute-simple-same-namespace.go b/conformance/tests/tlsroute-simple-same-namespace.go index 1a25676b6a..51db62aeff 100644 --- a/conformance/tests/tlsroute-simple-same-namespace.go +++ b/conformance/tests/tlsroute-simple-same-namespace.go @@ -40,7 +40,7 @@ func init() { var TLSRouteSimpleSameNamespace = suite.ConformanceTest{ ShortName: "TLSRouteSimpleSameNamespace", Description: "A single TLSRoute in the gateway-conformance-infra namespace attaches to a Gateway in the same namespace", - Features: []features.SupportedFeature{ + Features: []features.FeatureName{ features.SupportGateway, features.SupportTLSRoute, }, diff --git a/conformance/tests/udproute-simple.go b/conformance/tests/udproute-simple.go index b3e35ad57c..e8c84b86e7 100644 --- a/conformance/tests/udproute-simple.go +++ b/conformance/tests/udproute-simple.go @@ -38,9 +38,9 @@ var UDPRouteTest = suite.ConformanceTest{ ShortName: "UDPRoute", Description: "Make sure UDPRoute is working", Manifests: []string{"tests/udproute-simple.yaml"}, - Features: []features.SupportedFeature{ - features.SupportGateway, + Features: []features.FeatureName{ features.SupportUDPRoute, + features.SupportGateway, }, Test: func(t *testing.T, suite *suite.ConformanceTestSuite) { t.Run("Simple UDP request matching UDPRoute should reach coredns backend", func(t *testing.T) { diff --git a/conformance/utils/suite/conformance.go b/conformance/utils/suite/conformance.go index fa0ce20050..7274f8d033 100644 --- a/conformance/utils/suite/conformance.go +++ b/conformance/utils/suite/conformance.go @@ -17,6 +17,7 @@ limitations under the License. package suite import ( + "fmt" "strings" "testing" @@ -30,7 +31,7 @@ import ( type ConformanceTest struct { ShortName string Description string - Features []features.SupportedFeature + Features []features.FeatureName Manifests []string Slow bool Parallel bool @@ -44,13 +45,19 @@ func (test *ConformanceTest) Run(t *testing.T, suite *ConformanceTestSuite) { t.Parallel() } + var featuresInfo string // Test against features if the user hasn't focused on a single test if suite.RunTest == "" { // Check that all features exercised by the test have been opted into by // the suite. - for _, feature := range test.Features { - if !suite.SupportedFeatures.Has(feature) { - t.Skipf("Skipping %s: suite does not support %s", test.ShortName, feature) + for i, featureName := range test.Features { + if !suite.SupportedFeatures.Has(featureName) { + t.Skipf("Skipping %s: suite does not support %s", test.ShortName, featureName) + } + feature := features.GetFeature(featureName) + featuresInfo = fmt.Sprintf("%s%s-%s", featuresInfo, feature.Name, feature.Channel) + if i < len(test.Features)-1 { + featuresInfo += ", " } } } @@ -65,18 +72,21 @@ func (test *ConformanceTest) Run(t *testing.T, suite *ConformanceTestSuite) { suite.Applier.MustApplyWithCleanup(t, suite.Client, suite.TimeoutConfig, manifestLocation, true) } + if featuresInfo != "" { + tlog.Logf(t, "Running %s, relying on the following features: %s", test.ShortName, featuresInfo) + } test.Test(t, suite) } // ParseSupportedFeatures parses flag arguments and converts the string to -// sets.Set[features.SupportedFeature] -func ParseSupportedFeatures(f string) sets.Set[features.SupportedFeature] { +// sets.Set[features.FeatureName] +func ParseSupportedFeatures(f string) sets.Set[features.FeatureName] { if f == "" { return nil } - res := sets.Set[features.SupportedFeature]{} + res := sets.Set[features.FeatureName]{} for _, value := range strings.Split(f, ",") { - res.Insert(features.SupportedFeature(value)) + res.Insert(features.FeatureName(value)) } return res } diff --git a/conformance/utils/suite/conformance_test.go b/conformance/utils/suite/conformance_test.go index e52b86b7a0..9db08feba0 100644 --- a/conformance/utils/suite/conformance_test.go +++ b/conformance/utils/suite/conformance_test.go @@ -32,13 +32,13 @@ func TestParseSupportedFeatures(t *testing.T) { "b,c,d", } - s1 := sets.Set[features.SupportedFeature]{} + s1 := sets.Set[features.FeatureName]{} s1.Insert("a") - s2 := sets.Set[features.SupportedFeature]{} + s2 := sets.Set[features.FeatureName]{} s2.Insert("b") s2.Insert("c") s2.Insert("d") - features := []sets.Set[features.SupportedFeature]{nil, s1, s2} + features := []sets.Set[features.FeatureName]{nil, s1, s2} for i, f := range flags { expect := features[i] diff --git a/conformance/utils/suite/profiles.go b/conformance/utils/suite/profiles.go index 95eb82cae6..54f2169f9f 100644 --- a/conformance/utils/suite/profiles.go +++ b/conformance/utils/suite/profiles.go @@ -35,8 +35,8 @@ import ( // For more details see the relevant GEP: https://gateway-api.sigs.k8s.io/geps/gep-1709/ type ConformanceProfile struct { Name ConformanceProfileName - CoreFeatures sets.Set[features.SupportedFeature] - ExtendedFeatures sets.Set[features.SupportedFeature] + CoreFeatures sets.Set[features.FeatureName] + ExtendedFeatures sets.Set[features.FeatureName] } type ConformanceProfileName string @@ -77,9 +77,11 @@ var ( features.SupportReferenceGrant, features.SupportHTTPRoute, ), - ExtendedFeatures: sets.New[features.SupportedFeature](). - Insert(features.GatewayExtendedFeatures.UnsortedList()...). - Insert(features.HTTPRouteExtendedFeatures.UnsortedList()...), + ExtendedFeatures: sets.New[features.FeatureName](). + Insert(features.SetsToNamesSet( + features.GatewayExtendedFeatures, + features.HTTPRouteExtendedFeatures, + ).UnsortedList()...), } // GatewayTLSConformanceProfile is a ConformanceProfile that covers testing TLS @@ -91,7 +93,7 @@ var ( features.SupportReferenceGrant, features.SupportTLSRoute, ), - ExtendedFeatures: features.GatewayExtendedFeatures, + ExtendedFeatures: features.SetsToNamesSet(features.GatewayExtendedFeatures), } // GatewayGRPCConformanceProfile is a ConformanceProfile that covers testing GRPC @@ -103,7 +105,7 @@ var ( features.SupportReferenceGrant, features.SupportGRPCRoute, ), - ExtendedFeatures: features.GatewayExtendedFeatures, + ExtendedFeatures: features.SetsToNamesSet(features.GatewayExtendedFeatures), } // MeshHTTPConformanceProfile is a ConformanceProfile that covers testing HTTP @@ -114,10 +116,11 @@ var ( features.SupportMesh, features.SupportHTTPRoute, ), - ExtendedFeatures: sets.New[features.SupportedFeature](). - Insert(features.HTTPRouteExtendedFeatures.UnsortedList()...). - Insert(features.SupportMeshClusterIPMatching). - Insert(features.SupportMeshConsumerRoute), + ExtendedFeatures: sets.New[features.FeatureName](). + Insert(features.SetsToNamesSet( + features.MeshExtendedFeatures, + features.HTTPRouteExtendedFeatures, + ).UnsortedList()...), } // MeshGRPCConformanceProfile is a ConformanceProfile that covers testing GRPC @@ -128,9 +131,7 @@ var ( features.SupportMesh, features.SupportGRPCRoute, ), - ExtendedFeatures: sets.New[features.SupportedFeature](). - Insert(features.SupportMeshClusterIPMatching). - Insert(features.SupportMeshConsumerRoute), + ExtendedFeatures: features.SetsToNamesSet(features.MeshExtendedFeatures), } ) diff --git a/conformance/utils/suite/reports.go b/conformance/utils/suite/reports.go index 55178d5071..ea1e61a742 100644 --- a/conformance/utils/suite/reports.go +++ b/conformance/utils/suite/reports.go @@ -107,7 +107,7 @@ func (p profileReportsMap) list() (profileReports []confv1.ProfileReport) { return } -func (p profileReportsMap) compileResults(supportedFeaturesMap map[ConformanceProfileName]sets.Set[features.SupportedFeature], unsupportedFeaturesMap map[ConformanceProfileName]sets.Set[features.SupportedFeature]) { +func (p profileReportsMap) compileResults(supportedFeaturesMap map[ConformanceProfileName]sets.Set[features.FeatureName], unsupportedFeaturesMap map[ConformanceProfileName]sets.Set[features.FeatureName]) { for key, report := range p { // report the overall result for core features switch { diff --git a/conformance/utils/suite/suite.go b/conformance/utils/suite/suite.go index 13cfe13e4b..279298f2d0 100644 --- a/conformance/utils/suite/suite.go +++ b/conformance/utils/suite/suite.go @@ -68,7 +68,7 @@ type ConformanceTestSuite struct { BaseManifests string MeshManifests string Applier kubernetes.Applier - SupportedFeatures sets.Set[features.SupportedFeature] + SupportedFeatures sets.Set[features.FeatureName] TimeoutConfig config.TimeoutConfig SkipTests sets.Set[string] RunTest string @@ -109,11 +109,11 @@ type ConformanceTestSuite struct { // extendedSupportedFeatures is a compiled list of named features that were // marked as supported, and is used for reporting the test results. - extendedSupportedFeatures map[ConformanceProfileName]sets.Set[features.SupportedFeature] + extendedSupportedFeatures map[ConformanceProfileName]sets.Set[features.FeatureName] // extendedUnsupportedFeatures is a compiled list of named features that were // marked as not supported, and is used for reporting the test results. - extendedUnsupportedFeatures map[ConformanceProfileName]sets.Set[features.SupportedFeature] + extendedUnsupportedFeatures map[ConformanceProfileName]sets.Set[features.FeatureName] // lock is a mutex to help ensure thread safety of the test suite object. lock sync.RWMutex @@ -137,8 +137,8 @@ type ConformanceOptions struct { // CleanupBaseResources indicates whether or not the base test // resources such as Gateways should be cleaned up after the run. CleanupBaseResources bool - SupportedFeatures sets.Set[features.SupportedFeature] - ExemptFeatures sets.Set[features.SupportedFeature] + SupportedFeatures sets.Set[features.FeatureName] + ExemptFeatures sets.Set[features.FeatureName] EnableAllSupportedFeatures bool TimeoutConfig config.TimeoutConfig // SkipTests contains all the tests not to be run and can be used to opt out @@ -220,9 +220,9 @@ func NewConformanceTestSuite(options ConformanceOptions) (*ConformanceTestSuite, // cover all features, if they don't they'll need to have provided a // conformance profile or at least some specific features they support. if options.EnableAllSupportedFeatures { - options.SupportedFeatures = features.AllFeatures + options.SupportedFeatures = features.SetsToNamesSet(features.AllFeatures) } else if options.SupportedFeatures == nil { - options.SupportedFeatures = sets.New[features.SupportedFeature]() + options.SupportedFeatures = sets.New[features.FeatureName]() } for feature := range options.ExemptFeatures { @@ -252,8 +252,8 @@ func NewConformanceTestSuite(options ConformanceOptions) (*ConformanceTestSuite, UsableNetworkAddresses: options.UsableNetworkAddresses, UnusableNetworkAddresses: options.UnusableNetworkAddresses, results: make(map[string]testResult), - extendedUnsupportedFeatures: make(map[ConformanceProfileName]sets.Set[features.SupportedFeature]), - extendedSupportedFeatures: make(map[ConformanceProfileName]sets.Set[features.SupportedFeature]), + extendedUnsupportedFeatures: make(map[ConformanceProfileName]sets.Set[features.FeatureName]), + extendedSupportedFeatures: make(map[ConformanceProfileName]sets.Set[features.FeatureName]), conformanceProfiles: options.ConformanceProfiles, implementation: options.Implementation, mode: mode, @@ -276,12 +276,12 @@ func NewConformanceTestSuite(options ConformanceOptions) (*ConformanceTestSuite, for _, f := range conformanceProfile.ExtendedFeatures.UnsortedList() { if options.SupportedFeatures.Has(f) { if suite.extendedSupportedFeatures[conformanceProfileName] == nil { - suite.extendedSupportedFeatures[conformanceProfileName] = sets.New[features.SupportedFeature]() + suite.extendedSupportedFeatures[conformanceProfileName] = sets.New[features.FeatureName]() } suite.extendedSupportedFeatures[conformanceProfileName].Insert(f) } else { if suite.extendedUnsupportedFeatures[conformanceProfileName] == nil { - suite.extendedUnsupportedFeatures[conformanceProfileName] = sets.New[features.SupportedFeature]() + suite.extendedUnsupportedFeatures[conformanceProfileName] = sets.New[features.FeatureName]() } suite.extendedUnsupportedFeatures[conformanceProfileName].Insert(f) } diff --git a/hack/supportedfeatures/main.go b/hack/supportedfeatures/main.go index 9e5ec49082..0d8d7daa50 100644 --- a/hack/supportedfeatures/main.go +++ b/hack/supportedfeatures/main.go @@ -27,7 +27,7 @@ import ( func main() { feats := make([]string, features.AllFeatures.Len()) for i, feat := range features.AllFeatures.UnsortedList() { - feats[i] = string(feat) + feats[i] = string(feat.Name) } sort.Strings(feats) fmt.Println(strings.Join(feats, ";")) diff --git a/pkg/features/features.go b/pkg/features/features.go index 3f1ee91c64..8406c4b891 100644 --- a/pkg/features/features.go +++ b/pkg/features/features.go @@ -22,249 +22,24 @@ import "k8s.io/apimachinery/pkg/util/sets" // Features - Types // ----------------------------------------------------------------------------- -// SupportedFeature allows opting in to additional conformance tests at an -// individual feature granularity. -type SupportedFeature string +// FeatureName is the type used to represent the name of a feature. +type FeatureName string -// ----------------------------------------------------------------------------- -// Features - Gateway Conformance (Core) -// ----------------------------------------------------------------------------- - -const ( - // This option indicates support for Gateway. - // Opting out of this is allowed only for GAMMA-only implementations - SupportGateway SupportedFeature = "Gateway" -) - -// GatewayCoreFeatures are the features that are required to be conformant with -// the Gateway resource. -var GatewayCoreFeatures = sets.New( - SupportGateway, -) - -// ----------------------------------------------------------------------------- -// Features - Gateway Conformance (Extended) -// ----------------------------------------------------------------------------- - -const ( - // This option indicates that the Gateway can also use port 8080 - SupportGatewayPort8080 SupportedFeature = "GatewayPort8080" - - // SupportGatewayStaticAddresses option indicates that the Gateway is capable - // of allocating pre-determined addresses, rather than dynamically having - // addresses allocated for it. - SupportGatewayStaticAddresses SupportedFeature = "GatewayStaticAddresses" - - // SupportGatewayHTTPListenerIsolation option indicates support for the isolation - // of HTTP listeners. - SupportGatewayHTTPListenerIsolation SupportedFeature = "GatewayHTTPListenerIsolation" - - // SupportGatewayInfrastructureAnnotations option indicates support for - // spec.infrastructure.annotations and spec.infrastrucutre.labels - SupportGatewayInfrastructurePropagation SupportedFeature = "GatewayInfrastructurePropagation" -) - -// GatewayExtendedFeatures are extra generic features that implementations may -// choose to support as an opt-in. This does not include any Core Features. -var GatewayExtendedFeatures = sets.New( - SupportGatewayPort8080, - SupportGatewayStaticAddresses, - SupportGatewayHTTPListenerIsolation, - SupportGatewayInfrastructurePropagation, -) - -// ----------------------------------------------------------------------------- -// Features - ReferenceGrant Conformance (Core) -// ----------------------------------------------------------------------------- - -const ( - // This option indicates support for ReferenceGrant. - SupportReferenceGrant SupportedFeature = "ReferenceGrant" -) - -// ReferenceGrantCoreFeatures includes all SupportedFeatures needed to be -// conformant with the ReferenceGrant resource. -var ReferenceGrantCoreFeatures = sets.New( - SupportReferenceGrant, -) - -// ----------------------------------------------------------------------------- -// Features - HTTPRoute Conformance (Core) -// ----------------------------------------------------------------------------- - -const ( - // This option indicates support for HTTPRoute - SupportHTTPRoute SupportedFeature = "HTTPRoute" -) - -// HTTPRouteCoreFeatures includes all SupportedFeatures needed to be conformant with -// the HTTPRoute resource. -var HTTPRouteCoreFeatures = sets.New( - SupportHTTPRoute, -) - -// ----------------------------------------------------------------------------- -// Features - HTTPRoute Conformance (Extended) -// ----------------------------------------------------------------------------- - -const ( - // This option indicates support for HTTPRoute backend request header modification - SupportHTTPRouteBackendRequestHeaderModification SupportedFeature = "HTTPRouteBackendRequestHeaderModification" - - // This option indicates support for HTTPRoute query param matching (extended conformance). - SupportHTTPRouteQueryParamMatching SupportedFeature = "HTTPRouteQueryParamMatching" - - // This option indicates support for HTTPRoute method matching (extended conformance). - SupportHTTPRouteMethodMatching SupportedFeature = "HTTPRouteMethodMatching" - - // This option indicates support for HTTPRoute response header modification (extended conformance). - SupportHTTPRouteResponseHeaderModification SupportedFeature = "HTTPRouteResponseHeaderModification" - - // This option indicates support for HTTPRoute port redirect (extended conformance). - SupportHTTPRoutePortRedirect SupportedFeature = "HTTPRoutePortRedirect" - - // This option indicates support for HTTPRoute scheme redirect (extended conformance). - SupportHTTPRouteSchemeRedirect SupportedFeature = "HTTPRouteSchemeRedirect" - - // This option indicates support for HTTPRoute path redirect (extended conformance). - SupportHTTPRoutePathRedirect SupportedFeature = "HTTPRoutePathRedirect" - - // This option indicates support for HTTPRoute host rewrite (extended conformance) - SupportHTTPRouteHostRewrite SupportedFeature = "HTTPRouteHostRewrite" - - // This option indicates support for HTTPRoute path rewrite (extended conformance) - SupportHTTPRoutePathRewrite SupportedFeature = "HTTPRoutePathRewrite" - - // This option indicates support for HTTPRoute request mirror (extended conformance). - SupportHTTPRouteRequestMirror SupportedFeature = "HTTPRouteRequestMirror" - - // This option indicates support for multiple RequestMirror filters within the same HTTPRoute rule (extended conformance). - SupportHTTPRouteRequestMultipleMirrors SupportedFeature = "HTTPRouteRequestMultipleMirrors" - - // This option indicates support for HTTPRoute request timeouts (extended conformance). - SupportHTTPRouteRequestTimeout SupportedFeature = "HTTPRouteRequestTimeout" - - // This option indicates support for HTTPRoute backendRequest timeouts (extended conformance). - SupportHTTPRouteBackendTimeout SupportedFeature = "HTTPRouteBackendTimeout" - - // This option indicates support for HTTPRoute parentRef port (extended conformance). - SupportHTTPRouteParentRefPort SupportedFeature = "HTTPRouteParentRefPort" - - // This option indicates support for HTTPRoute with a backendref with an appProtocol 'kubernetes.io/h2c' (extended conformance) - SupportHTTPRouteBackendProtocolH2C SupportedFeature = "HTTPRouteBackendProtocolH2C" - - // This option indicates support for HTTPRoute with a backendref with an appProtoocol 'kubernetes.io/ws' (extended conformance) - SupportHTTPRouteBackendProtocolWebSocket SupportedFeature = "HTTPRouteBackendProtocolWebSocket" -) - -// HTTPRouteExtendedFeatures includes all extended features for HTTPRoute -// conformance and can be used to opt-in to run all HTTPRoute extended features tests. -// This does not include any Core Features. -var HTTPRouteExtendedFeatures = sets.New( - SupportHTTPRouteQueryParamMatching, - SupportHTTPRouteMethodMatching, - SupportHTTPRouteResponseHeaderModification, - SupportHTTPRoutePortRedirect, - SupportHTTPRouteSchemeRedirect, - SupportHTTPRoutePathRedirect, - SupportHTTPRouteHostRewrite, - SupportHTTPRoutePathRewrite, - SupportHTTPRouteRequestMirror, - SupportHTTPRouteRequestMultipleMirrors, - SupportHTTPRouteRequestTimeout, - SupportHTTPRouteBackendTimeout, - SupportHTTPRouteParentRefPort, - SupportHTTPRouteBackendRequestHeaderModification, - SupportHTTPRouteBackendProtocolH2C, - SupportHTTPRouteBackendProtocolWebSocket, -) - -// ----------------------------------------------------------------------------- -// Features - HTTPRoute Conformance (Experimental) -// ----------------------------------------------------------------------------- - -const ( - // This option indicates support for Destination Port matching. - SupportHTTPRouteDestinationPortMatching SupportedFeature = "HTTPRouteDestinationPortMatching" -) - -// HTTPRouteExperimentalFeatures includes all the supported experimental features, currently only -// available in our experimental release channel. -// Implementations have the flexibility to opt-in for either specific features or the entire set. -var HTTPRouteExperimentalFeatures = sets.New( - SupportHTTPRouteDestinationPortMatching, -) - -// ----------------------------------------------------------------------------- -// Features - TLSRoute Conformance (Core) -// ----------------------------------------------------------------------------- - -const ( - // This option indicates support for TLSRoute - SupportTLSRoute SupportedFeature = "TLSRoute" -) - -// TLSCoreFeatures includes all the supported features for the TLSRoute API at -// a Core level of support. -var TLSRouteCoreFeatures = sets.New( - SupportTLSRoute, -) - -// ----------------------------------------------------------------------------- -// Features - UDPRoute Conformance (Core) -// ----------------------------------------------------------------------------- - -const ( - // This option indicates support for UDPRoute - SupportUDPRoute SupportedFeature = "UDPRoute" -) - -// UDPRouteCoreFeatures includes all SupportedFeatures needed to be conformant with -// the UDPRoute resource. -var UDPRouteFeatures = sets.New( - SupportUDPRoute, -) - -// ----------------------------------------------------------------------------- -// Features - Mesh Conformance (Core) -// ----------------------------------------------------------------------------- +// FeatureChannel is the type used to represent the channel a feature belongs to. +type FeatureChannel string const ( - // This option indicates general support for service mesh - SupportMesh SupportedFeature = "Mesh" - // This option indicates support for matching Service traffic specifically by Cluster IP rather than other mechanisms. - SupportMeshClusterIPMatching SupportedFeature = "MeshClusterIPMatching" - // This option indicates support for "consumer" routes, where a namespace creates a route for a service in another namespace. - SupportMeshConsumerRoute SupportedFeature = "MeshConsumerRoute" + // FeatureChannelExperimental is used for experimental features. + FeatureChannelExperimental = "experimental" + // FeatureChannelStandard is used for standard features. + FeatureChannelStandard = "standard" ) -// MeshCoreFeatures includes all the supported features for the service mesh at -// a Core level of support. -var MeshCoreFeatures = sets.New( - SupportMesh, -) - -// MeshExtendedFeatures includes all the supported features for the service mesh at -// an Extended level of support. -var MeshExtendedFeatures = sets.New( - SupportMeshClusterIPMatching, - SupportMeshConsumerRoute, -) - -// ----------------------------------------------------------------------------- -// Features - GRPCRoute Conformance -// ----------------------------------------------------------------------------- - -const ( - // This option indicates general support for service mesh - SupportGRPCRoute SupportedFeature = "GRPCRoute" -) - -// GRPCRouteCoreFeatures includes all the supported features for GRPCRoute at -// a Core level of support. -var GRPCRouteCoreFeatures = sets.New( - SupportGRPCRoute, -) +// Feature is a struct that represents a feature. +type Feature struct { + Name FeatureName + Channel FeatureChannel +} // ----------------------------------------------------------------------------- // Features - Compilations @@ -274,14 +49,44 @@ var GRPCRouteCoreFeatures = sets.New( // conformance tests with `all-features` flag. // // NOTE: as new feature sets are added they should be inserted into this set. -var AllFeatures = sets.New[SupportedFeature](). - Insert(GatewayCoreFeatures.UnsortedList()...). - Insert(GatewayExtendedFeatures.UnsortedList()...). - Insert(ReferenceGrantCoreFeatures.UnsortedList()...). - Insert(HTTPRouteCoreFeatures.UnsortedList()...). - Insert(HTTPRouteExtendedFeatures.UnsortedList()...). - Insert(HTTPRouteExperimentalFeatures.UnsortedList()...). - Insert(TLSRouteCoreFeatures.UnsortedList()...). - Insert(MeshCoreFeatures.UnsortedList()...). - Insert(MeshExtendedFeatures.UnsortedList()...). - Insert(GRPCRouteCoreFeatures.UnsortedList()...) + +var ( + AllFeatures = sets.New[Feature](). + Insert(GatewayCoreFeatures.UnsortedList()...). + Insert(GatewayExtendedFeatures.UnsortedList()...). + Insert(ReferenceGrantCoreFeatures.UnsortedList()...). + Insert(HTTPRouteCoreFeatures.UnsortedList()...). + Insert(HTTPRouteExtendedFeatures.UnsortedList()...). + Insert(TLSRouteCoreFeatures.UnsortedList()...). + Insert(MeshCoreFeatures.UnsortedList()...). + Insert(MeshExtendedFeatures.UnsortedList()...). + Insert(GRPCRouteCoreFeatures.UnsortedList()...) + + featureMap = map[FeatureName]Feature{} +) + +func init() { + for _, feature := range AllFeatures.UnsortedList() { + featureMap[feature.Name] = feature + } +} + +// ----------------------------------------------------------------------------- +// Features - Helpers +// ----------------------------------------------------------------------------- + +// SetsToNamesSet merges multiple sets of features into a single one and returns it. +func SetsToNamesSet(featuresSets ...sets.Set[Feature]) sets.Set[FeatureName] { + res := sets.Set[FeatureName]{} + for _, set := range featuresSets { + for _, feature := range set.UnsortedList() { + res.Insert(feature.Name) + } + } + return res +} + +// GetFeature returns the feature with the given name. +func GetFeature(name FeatureName) Feature { + return featureMap[name] +} diff --git a/pkg/features/gateway.go b/pkg/features/gateway.go new file mode 100644 index 0000000000..a90a32a4b3 --- /dev/null +++ b/pkg/features/gateway.go @@ -0,0 +1,95 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package features + +import "k8s.io/apimachinery/pkg/util/sets" + +// ----------------------------------------------------------------------------- +// Features - Gateway Conformance (Core) +// ----------------------------------------------------------------------------- + +const ( + // This option indicates support for Gateway. + // Opting out of this is allowed only for GAMMA-only implementations + SupportGateway FeatureName = "Gateway" +) + +// GatewayFeature contains metadata for the Gateway feature. +var GatewayFeature = Feature{ + Name: SupportGateway, + Channel: FeatureChannelStandard, +} + +// GatewayCoreFeatures are the features that are required to be conformant with +// the Gateway resource. +var GatewayCoreFeatures = sets.New( + GatewayFeature, +) + +// ----------------------------------------------------------------------------- +// Features - Gateway Conformance (Extended) +// ----------------------------------------------------------------------------- + +const ( + // This option indicates that the Gateway can also use port 8080 + SupportGatewayPort8080 FeatureName = "GatewayPort8080" + + // SupportGatewayStaticAddresses option indicates that the Gateway is capable + // of allocating pre-determined addresses, rather than dynamically having + // addresses allocated for it. + SupportGatewayStaticAddresses FeatureName = "GatewayStaticAddresses" + + // SupportGatewayHTTPListenerIsolation option indicates support for the isolation + // of HTTP listeners. + SupportGatewayHTTPListenerIsolation FeatureName = "GatewayHTTPListenerIsolation" + + // SupportGatewayInfrastructureAnnotations option indicates support for + // spec.infrastructure.annotations and spec.infrastrucutre.labels + SupportGatewayInfrastructurePropagation FeatureName = "GatewayInfrastructurePropagation" +) + +var ( + // GatewayPort8080Feature contains metadata for the GatewayPort8080 feature. + GatewayPort8080Feature = Feature{ + Name: SupportGatewayPort8080, + Channel: FeatureChannelStandard, + } + // GatewayStaticAddressesFeature contains metadata for the GatewayStaticAddresses feature. + GatewayStaticAddressesFeature = Feature{ + Name: SupportGatewayStaticAddresses, + Channel: FeatureChannelStandard, + } + // GatewayHTTPListenerIsolationFeature contains metadata for the GatewayHTTPListenerIsolation feature. + GatewayHTTPListenerIsolationFeature = Feature{ + Name: SupportGatewayHTTPListenerIsolation, + Channel: FeatureChannelStandard, + } + // GatewayInfrastructurePropagationFeature contains metadata for the GatewayInfrastructurePropagation feature. + GatewayInfrastructurePropagationFeature = Feature{ + Name: SupportGatewayInfrastructurePropagation, + Channel: FeatureChannelExperimental, + } +) + +// GatewayExtendedFeatures are extra generic features that implementations may +// choose to support as an opt-in. This does not include any Core Features. +var GatewayExtendedFeatures = sets.New( + GatewayPort8080Feature, + GatewayStaticAddressesFeature, + GatewayHTTPListenerIsolationFeature, + GatewayInfrastructurePropagationFeature, +) diff --git a/pkg/features/grpcroute.go b/pkg/features/grpcroute.go new file mode 100644 index 0000000000..ffa3f38318 --- /dev/null +++ b/pkg/features/grpcroute.go @@ -0,0 +1,40 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package features + +import "k8s.io/apimachinery/pkg/util/sets" + +// ----------------------------------------------------------------------------- +// Features - GRPCRoute Conformance +// ----------------------------------------------------------------------------- + +const ( + // This option indicates general support for GRPCRoute. + SupportGRPCRoute FeatureName = "GRPCRoute" +) + +// GRPCRouteFeature contains metadata for the GRPCRoute feature. +var GRPCRouteFeature = Feature{ + Name: SupportGRPCRoute, + Channel: FeatureChannelStandard, +} + +// GRPCRouteCoreFeatures includes all the supported features for GRPCRoute at +// a Core level of support. +var GRPCRouteCoreFeatures = sets.New( + GRPCRouteFeature, +) diff --git a/pkg/features/httproute.go b/pkg/features/httproute.go new file mode 100644 index 0000000000..28c3997622 --- /dev/null +++ b/pkg/features/httproute.go @@ -0,0 +1,208 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package features + +import "k8s.io/apimachinery/pkg/util/sets" + +// ----------------------------------------------------------------------------- +// Features - HTTPRoute Conformance (Core) +// ----------------------------------------------------------------------------- + +const ( + // This option indicates support for HTTPRoute + SupportHTTPRoute FeatureName = "HTTPRoute" +) + +// HTTPRouteFeature contains metadata for the HTTPRoute feature. +var HTTPRouteFeature = Feature{ + Name: SupportHTTPRoute, + Channel: FeatureChannelStandard, +} + +// HTTPRouteCoreFeatures includes all SupportedFeatures needed to be conformant with +// the HTTPRoute resource. +var HTTPRouteCoreFeatures = sets.New( + HTTPRouteFeature, +) + +// ----------------------------------------------------------------------------- +// Features - HTTPRoute Conformance (Extended) +// ----------------------------------------------------------------------------- + +const ( + // This option indicates support for Destination Port matching. + SupportHTTPRouteDestinationPortMatching FeatureName = "HTTPRouteDestinationPortMatching" + + // This option indicates support for HTTPRoute backend request header modification + SupportHTTPRouteBackendRequestHeaderModification FeatureName = "HTTPRouteBackendRequestHeaderModification" + + // This option indicates support for HTTPRoute query param matching (extended conformance). + SupportHTTPRouteQueryParamMatching FeatureName = "HTTPRouteQueryParamMatching" + + // This option indicates support for HTTPRoute method matching (extended conformance). + SupportHTTPRouteMethodMatching FeatureName = "HTTPRouteMethodMatching" + + // This option indicates support for HTTPRoute response header modification (extended conformance). + SupportHTTPRouteResponseHeaderModification FeatureName = "HTTPRouteResponseHeaderModification" + + // This option indicates support for HTTPRoute port redirect (extended conformance). + SupportHTTPRoutePortRedirect FeatureName = "HTTPRoutePortRedirect" + + // This option indicates support for HTTPRoute scheme redirect (extended conformance). + SupportHTTPRouteSchemeRedirect FeatureName = "HTTPRouteSchemeRedirect" + + // This option indicates support for HTTPRoute path redirect (extended conformance). + SupportHTTPRoutePathRedirect FeatureName = "HTTPRoutePathRedirect" + + // This option indicates support for HTTPRoute host rewrite (extended conformance) + SupportHTTPRouteHostRewrite FeatureName = "HTTPRouteHostRewrite" + + // This option indicates support for HTTPRoute path rewrite (extended conformance) + SupportHTTPRoutePathRewrite FeatureName = "HTTPRoutePathRewrite" + + // This option indicates support for HTTPRoute request mirror (extended conformance). + SupportHTTPRouteRequestMirror FeatureName = "HTTPRouteRequestMirror" + + // This option indicates support for multiple RequestMirror filters within the same HTTPRoute rule (extended conformance). + SupportHTTPRouteRequestMultipleMirrors FeatureName = "HTTPRouteRequestMultipleMirrors" + + // This option indicates support for HTTPRoute request timeouts (extended conformance). + SupportHTTPRouteRequestTimeout FeatureName = "HTTPRouteRequestTimeout" + + // This option indicates support for HTTPRoute backendRequest timeouts (extended conformance). + SupportHTTPRouteBackendTimeout FeatureName = "HTTPRouteBackendTimeout" + + // This option indicates support for HTTPRoute parentRef port (extended conformance). + SupportHTTPRouteParentRefPort FeatureName = "HTTPRouteParentRefPort" + + // This option indicates support for HTTPRoute with a backendref with an appProtocol 'kubernetes.io/h2c' (extended conformance) + SupportHTTPRouteBackendProtocolH2C FeatureName = "HTTPRouteBackendProtocolH2C" + + // This option indicates support for HTTPRoute with a backendref with an appProtoocol 'kubernetes.io/ws' (extended conformance) + SupportHTTPRouteBackendProtocolWebSocket FeatureName = "HTTPRouteBackendProtocolWebSocket" +) + +var ( + // HTTPRouteDestinationPortMatchingFeature contains metadata for the HTTPRouteDestinationPortMatching feature. + HTTPRouteDestinationPortMatchingFeature = Feature{ + Name: SupportHTTPRouteDestinationPortMatching, + Channel: FeatureChannelExperimental, + } + // HTTPRouteBackendRequestHeaderModificationFeature contains metadata for the HTTPRouteBackendRequestHeaderModification feature. + HTTPRouteBackendRequestHeaderModificationFeature = Feature{ + Name: SupportHTTPRouteBackendRequestHeaderModification, + Channel: FeatureChannelStandard, + } + // HTTPRouteQueryParamMatchingFeature contains metadata for the HTTPRouteQueryParamMatching feature. + HTTPRouteQueryParamMatchingFeature = Feature{ + Name: SupportHTTPRouteQueryParamMatching, + Channel: FeatureChannelStandard, + } + // HTTPRouteMethodMatchingFeature contains metadata for the HTTPRouteMethodMatching feature. + HTTPRouteMethodMatchingFeature = Feature{ + Name: SupportHTTPRouteMethodMatching, + Channel: FeatureChannelStandard, + } + // HTTPRouteResponseHeaderModificationFeature contains metadata for the HTTPRouteResponseHeaderModification feature. + HTTPRouteResponseHeaderModificationFeature = Feature{ + Name: SupportHTTPRouteResponseHeaderModification, + Channel: FeatureChannelStandard, + } + // HTTPRoutePortRedirectFeature contains metadata for the HTTPRoutePortRedirect feature. + HTTPRoutePortRedirectFeature = Feature{ + Name: SupportHTTPRoutePortRedirect, + Channel: FeatureChannelStandard, + } + // HTTPRouteSchemeRedirectFeature contains metadata for the HTTPRouteSchemeRedirect feature. + HTTPRouteSchemeRedirectFeature = Feature{ + Name: SupportHTTPRouteSchemeRedirect, + Channel: FeatureChannelStandard, + } + // HTTPRoutePathRedirectFeature contains metadata for the HTTPRoutePathRedirect feature. + HTTPRoutePathRedirectFeature = Feature{ + Name: SupportHTTPRoutePathRedirect, + Channel: FeatureChannelStandard, + } + // HTTPRouteHostRewriteFeature contains metadata for the HTTPRouteHostRewrite feature. + HTTPRouteHostRewriteFeature = Feature{ + Name: SupportHTTPRouteHostRewrite, + Channel: FeatureChannelStandard, + } + // HTTPRoutePathRewriteFeature contains metadata for the HTTPRoutePathRewrite feature. + HTTPRoutePathRewriteFeature = Feature{ + Name: SupportHTTPRoutePathRewrite, + Channel: FeatureChannelStandard, + } + // HTTPRouteRequestMirrorFeature contains metadata for the HTTPRouteRequestMirror feature. + HTTPRouteRequestMirrorFeature = Feature{ + Name: SupportHTTPRouteRequestMirror, + Channel: FeatureChannelStandard, + } + // HTTPRouteRequestMultipleMirrorsFeature contains metadata for the HTTPRouteRequestMultipleMirrors feature. + HTTPRouteRequestMultipleMirrorsFeature = Feature{ + Name: SupportHTTPRouteRequestMultipleMirrors, + Channel: FeatureChannelStandard, + } + // HTTPRouteRequestTimeoutFeature contains metadata for the HTTPRouteRequestTimeout feature. + HTTPRouteRequestTimeoutFeature = Feature{ + Name: SupportHTTPRouteRequestTimeout, + Channel: FeatureChannelStandard, + } + // HTTPRouteBackendTimeoutFeature contains metadata for the HTTPRouteBackendTimeout feature. + HTTPRouteBackendTimeoutFeature = Feature{ + Name: SupportHTTPRouteBackendTimeout, + Channel: FeatureChannelStandard, + } + // HTTPRouteParentRefPortFeature contains metadata for the HTTPRouteParentRefPort feature. + HTTPRouteParentRefPortFeature = Feature{ + Name: SupportHTTPRouteParentRefPort, + Channel: FeatureChannelStandard, + } + // HTTPRouteBackendProtocolH2CFeature contains metadata for the HTTPRouteBackendProtocolH2C feature. + HTTPRouteBackendProtocolH2CFeature = Feature{ + Name: SupportHTTPRouteBackendProtocolH2C, + Channel: FeatureChannelStandard, + } + // HTTPRouteBackendProtocolWebSocketFeature contains metadata for the HTTPRouteBackendProtocolWebSocket feature. + HTTPRouteBackendProtocolWebSocketFeature = Feature{ + Name: SupportHTTPRouteBackendProtocolWebSocket, + Channel: FeatureChannelStandard, + } +) + +// HTTPRouteExtendedFeatures includes all extended features for HTTPRoute +// conformance and can be used to opt-in to run all HTTPRoute extended features tests. +// This does not include any Core Features. +var HTTPRouteExtendedFeatures = sets.New( + HTTPRouteDestinationPortMatchingFeature, + HTTPRouteBackendRequestHeaderModificationFeature, + HTTPRouteQueryParamMatchingFeature, + HTTPRouteMethodMatchingFeature, + HTTPRouteResponseHeaderModificationFeature, + HTTPRoutePortRedirectFeature, + HTTPRouteSchemeRedirectFeature, + HTTPRoutePathRedirectFeature, + HTTPRouteHostRewriteFeature, + HTTPRoutePathRewriteFeature, + HTTPRouteRequestMirrorFeature, + HTTPRouteRequestMultipleMirrorsFeature, + HTTPRouteRequestTimeoutFeature, + HTTPRouteBackendTimeoutFeature, + HTTPRouteParentRefPortFeature, + HTTPRouteBackendProtocolH2CFeature, + HTTPRouteBackendProtocolWebSocketFeature, +) diff --git a/pkg/features/mesh.go b/pkg/features/mesh.go new file mode 100644 index 0000000000..b52a7dff93 --- /dev/null +++ b/pkg/features/mesh.go @@ -0,0 +1,71 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package features + +import "k8s.io/apimachinery/pkg/util/sets" + +// ----------------------------------------------------------------------------- +// Features - Mesh Conformance (Core) +// ----------------------------------------------------------------------------- + +const ( + // This option indicates general support for service mesh + SupportMesh FeatureName = "Mesh" +) + +// MeshFeature contains metadata for the Mesh feature. +var MeshFeature = Feature{ + Name: SupportMesh, + Channel: FeatureChannelStandard, +} + +// MeshCoreFeatures includes all the supported features for the service mesh at +// a Core level of support. +var MeshCoreFeatures = sets.New( + MeshFeature, +) + +// ----------------------------------------------------------------------------- +// Features - Mesh Conformance (Extended) +// ----------------------------------------------------------------------------- + +const ( + // This option indicates support for matching Service traffic specifically by Cluster IP rather than other mechanisms. + SupportMeshClusterIPMatching FeatureName = "MeshClusterIPMatching" + // This option indicates support for "consumer" routes, where a namespace creates a route for a service in another namespace. + SupportMeshConsumerRoute FeatureName = "MeshConsumerRoute" +) + +var ( + // MeshClusterIPMatchingFeature contains metadata for the MeshClusterIPMatching feature. + MeshClusterIPMatchingFeature = Feature{ + Name: SupportMeshClusterIPMatching, + Channel: FeatureChannelStandard, + } + // MeshConsumerRouteFeature contains metadata for the MeshConsumerRoute feature. + MeshConsumerRouteFeature = Feature{ + Name: SupportMeshConsumerRoute, + Channel: FeatureChannelStandard, + } +) + +// MeshExtendedFeatures includes all the supported features for the service mesh at +// an Extended level of support. +var MeshExtendedFeatures = sets.New( + MeshClusterIPMatchingFeature, + MeshConsumerRouteFeature, +) diff --git a/pkg/features/referencegrant.go b/pkg/features/referencegrant.go new file mode 100644 index 0000000000..297f633069 --- /dev/null +++ b/pkg/features/referencegrant.go @@ -0,0 +1,40 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package features + +import "k8s.io/apimachinery/pkg/util/sets" + +// ----------------------------------------------------------------------------- +// Features - ReferenceGrant Conformance (Core) +// ----------------------------------------------------------------------------- + +const ( + // This option indicates support for ReferenceGrant. + SupportReferenceGrant FeatureName = "ReferenceGrant" +) + +// ReferenceGrantFeature contains metadata for the ReferenceGrant feature. +var ReferenceGrantFeature = Feature{ + Name: SupportReferenceGrant, + Channel: FeatureChannelStandard, +} + +// ReferenceGrantCoreFeatures includes all SupportedFeatures needed to be +// conformant with the ReferenceGrant resource. +var ReferenceGrantCoreFeatures = sets.New( + ReferenceGrantFeature, +) diff --git a/pkg/features/tlsroute.go b/pkg/features/tlsroute.go new file mode 100644 index 0000000000..90d68c3d34 --- /dev/null +++ b/pkg/features/tlsroute.go @@ -0,0 +1,40 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package features + +import "k8s.io/apimachinery/pkg/util/sets" + +// ----------------------------------------------------------------------------- +// Features - TLSRoute Conformance (Core) +// ----------------------------------------------------------------------------- + +const ( + // This option indicates support for TLSRoute + SupportTLSRoute FeatureName = "TLSRoute" +) + +// TLSRouteFeature contains metadata for the TLSRoute feature. +var TLSRouteFeature = Feature{ + Name: SupportTLSRoute, + Channel: FeatureChannelExperimental, +} + +// TLSCoreFeatures includes all the supported features for the TLSRoute API at +// a Core level of support. +var TLSRouteCoreFeatures = sets.New( + TLSRouteFeature, +) diff --git a/pkg/features/udproute.go b/pkg/features/udproute.go new file mode 100644 index 0000000000..c4c2af1d5b --- /dev/null +++ b/pkg/features/udproute.go @@ -0,0 +1,38 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package features + +// ----------------------------------------------------------------------------- +// Features - UDPRoute Conformance (Core) +// ----------------------------------------------------------------------------- + +const ( + // This option indicates support for UDPRoute + SupportUDPRoute FeatureName = "UDPRoute" +) + +// UDPRouteFeature contains metadata for the UDPRoute feature. +var UDPRouteFeature = Feature{ + Name: SupportUDPRoute, + Channel: FeatureChannelExperimental, +} + +// UDPRouteCoreFeatures includes all SupportedFeatures needed to be conformant with +// the UDPRoute resource. +var UDPRouteFeatures = map[FeatureName]Feature{ + SupportUDPRoute: UDPRouteFeature, +}