diff --git a/apis/v1/gateway_types.go b/apis/v1/gateway_types.go index caa5e96bf3..58cef66f38 100644 --- a/apis/v1/gateway_types.go +++ b/apis/v1/gateway_types.go @@ -526,6 +526,15 @@ type AllowedRoutes struct { // // +optional // +kubebuilder:validation:MaxItems=8 + // + // The following list states the Route kinds compatible for each protocolType + // for route kinds and protocolTypes included in Gateway API + // + // HTTP: HTTPRoutes, GRPCRoutes + // HTTPS: HTTPRoutes, GRPCRoutes, TLSRoutes + // TLS: TLSRoutes, TCPRoutes + // TCP: TCPRoutes + // UDP: UDPRoutes Kinds []RouteGroupKind `json:"kinds,omitempty"` } diff --git a/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml b/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml index 3649f6b709..baba9c1188 100644 --- a/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml +++ b/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml @@ -429,20 +429,20 @@ spec: Support: Core properties: kinds: - description: |- - Kinds specifies the groups and kinds of Routes that are allowed to bind - to this Gateway Listener. When unspecified or empty, the kinds of Routes - selected are determined using the Listener protocol. - - - A RouteGroupKind MUST correspond to kinds of Routes that are compatible - with the application protocol specified in the Listener's Protocol field. - If an implementation does not support or recognize this resource type, it - MUST set the "ResolvedRefs" condition to False for this Listener with the - "InvalidRouteKinds" reason. - - - Support: Core + description: "Kinds specifies the groups and kinds of Routes + that are allowed to bind\nto this Gateway Listener. When + unspecified or empty, the kinds of Routes\nselected are + determined using the Listener protocol.\n\n\nA RouteGroupKind + MUST correspond to kinds of Routes that are compatible\nwith + the application protocol specified in the Listener's Protocol + field.\nIf an implementation does not support or recognize + this resource type, it\nMUST set the \"ResolvedRefs\" + condition to False for this Listener with the\n\"InvalidRouteKinds\" + reason.\n\n\nSupport: Core\n\n\nThe following list states + the Route kinds compatible for each protocolType\nfor + route kinds and protocolTypes included in Gateway API\n\n\nHTTP: + HTTPRoutes, GRPCRoutes\nHTTPS: HTTPRoutes, GRPCRoutes, + TLSRoutes\nTLS: TLSRoutes, TCPRoutes\nTCP: TCPRoutes\nUDP:\tUDPRoutes" items: description: RouteGroupKind indicates the group and kind of a Route resource. @@ -1656,20 +1656,20 @@ spec: Support: Core properties: kinds: - description: |- - Kinds specifies the groups and kinds of Routes that are allowed to bind - to this Gateway Listener. When unspecified or empty, the kinds of Routes - selected are determined using the Listener protocol. - - - A RouteGroupKind MUST correspond to kinds of Routes that are compatible - with the application protocol specified in the Listener's Protocol field. - If an implementation does not support or recognize this resource type, it - MUST set the "ResolvedRefs" condition to False for this Listener with the - "InvalidRouteKinds" reason. - - - Support: Core + description: "Kinds specifies the groups and kinds of Routes + that are allowed to bind\nto this Gateway Listener. When + unspecified or empty, the kinds of Routes\nselected are + determined using the Listener protocol.\n\n\nA RouteGroupKind + MUST correspond to kinds of Routes that are compatible\nwith + the application protocol specified in the Listener's Protocol + field.\nIf an implementation does not support or recognize + this resource type, it\nMUST set the \"ResolvedRefs\" + condition to False for this Listener with the\n\"InvalidRouteKinds\" + reason.\n\n\nSupport: Core\n\n\nThe following list states + the Route kinds compatible for each protocolType\nfor + route kinds and protocolTypes included in Gateway API\n\n\nHTTP: + HTTPRoutes, GRPCRoutes\nHTTPS: HTTPRoutes, GRPCRoutes, + TLSRoutes\nTLS: TLSRoutes, TCPRoutes\nTCP: TCPRoutes\nUDP:\tUDPRoutes" items: description: RouteGroupKind indicates the group and kind of a Route resource. diff --git a/config/crd/standard/gateway.networking.k8s.io_gateways.yaml b/config/crd/standard/gateway.networking.k8s.io_gateways.yaml index a191ffd236..ff33137eb4 100644 --- a/config/crd/standard/gateway.networking.k8s.io_gateways.yaml +++ b/config/crd/standard/gateway.networking.k8s.io_gateways.yaml @@ -333,20 +333,20 @@ spec: Support: Core properties: kinds: - description: |- - Kinds specifies the groups and kinds of Routes that are allowed to bind - to this Gateway Listener. When unspecified or empty, the kinds of Routes - selected are determined using the Listener protocol. - - - A RouteGroupKind MUST correspond to kinds of Routes that are compatible - with the application protocol specified in the Listener's Protocol field. - If an implementation does not support or recognize this resource type, it - MUST set the "ResolvedRefs" condition to False for this Listener with the - "InvalidRouteKinds" reason. - - - Support: Core + description: "Kinds specifies the groups and kinds of Routes + that are allowed to bind\nto this Gateway Listener. When + unspecified or empty, the kinds of Routes\nselected are + determined using the Listener protocol.\n\n\nA RouteGroupKind + MUST correspond to kinds of Routes that are compatible\nwith + the application protocol specified in the Listener's Protocol + field.\nIf an implementation does not support or recognize + this resource type, it\nMUST set the \"ResolvedRefs\" + condition to False for this Listener with the\n\"InvalidRouteKinds\" + reason.\n\n\nSupport: Core\n\n\nThe following list states + the Route kinds compatible for each protocolType\nfor + route kinds and protocolTypes included in Gateway API\n\n\nHTTP: + HTTPRoutes, GRPCRoutes\nHTTPS: HTTPRoutes, GRPCRoutes, + TLSRoutes\nTLS: TLSRoutes, TCPRoutes\nTCP: TCPRoutes\nUDP:\tUDPRoutes" items: description: RouteGroupKind indicates the group and kind of a Route resource. @@ -1366,20 +1366,20 @@ spec: Support: Core properties: kinds: - description: |- - Kinds specifies the groups and kinds of Routes that are allowed to bind - to this Gateway Listener. When unspecified or empty, the kinds of Routes - selected are determined using the Listener protocol. - - - A RouteGroupKind MUST correspond to kinds of Routes that are compatible - with the application protocol specified in the Listener's Protocol field. - If an implementation does not support or recognize this resource type, it - MUST set the "ResolvedRefs" condition to False for this Listener with the - "InvalidRouteKinds" reason. - - - Support: Core + description: "Kinds specifies the groups and kinds of Routes + that are allowed to bind\nto this Gateway Listener. When + unspecified or empty, the kinds of Routes\nselected are + determined using the Listener protocol.\n\n\nA RouteGroupKind + MUST correspond to kinds of Routes that are compatible\nwith + the application protocol specified in the Listener's Protocol + field.\nIf an implementation does not support or recognize + this resource type, it\nMUST set the \"ResolvedRefs\" + condition to False for this Listener with the\n\"InvalidRouteKinds\" + reason.\n\n\nSupport: Core\n\n\nThe following list states + the Route kinds compatible for each protocolType\nfor + route kinds and protocolTypes included in Gateway API\n\n\nHTTP: + HTTPRoutes, GRPCRoutes\nHTTPS: HTTPRoutes, GRPCRoutes, + TLSRoutes\nTLS: TLSRoutes, TCPRoutes\nTCP: TCPRoutes\nUDP:\tUDPRoutes" items: description: RouteGroupKind indicates the group and kind of a Route resource. diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index e9c9b17c18..ebc713da4a 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -2739,7 +2739,7 @@ func schema_sigsk8sio_gateway_api_apis_v1_AllowedRoutes(ref common.ReferenceCall }, "kinds": { SchemaProps: spec.SchemaProps{ - Description: "Kinds specifies the groups and kinds of Routes that are allowed to bind to this Gateway Listener. When unspecified or empty, the kinds of Routes selected are determined using the Listener protocol.\n\nA RouteGroupKind MUST correspond to kinds of Routes that are compatible with the application protocol specified in the Listener's Protocol field. If an implementation does not support or recognize this resource type, it MUST set the \"ResolvedRefs\" condition to False for this Listener with the \"InvalidRouteKinds\" reason.\n\nSupport: Core", + Description: "Kinds specifies the groups and kinds of Routes that are allowed to bind to this Gateway Listener. When unspecified or empty, the kinds of Routes selected are determined using the Listener protocol.\n\nA RouteGroupKind MUST correspond to kinds of Routes that are compatible with the application protocol specified in the Listener's Protocol field. If an implementation does not support or recognize this resource type, it MUST set the \"ResolvedRefs\" condition to False for this Listener with the \"InvalidRouteKinds\" reason.\n\nSupport: Core\n\n\nThe following list states the Route kinds compatible for each protocolType for route kinds and protocolTypes included in Gateway API\n\nHTTP: HTTPRoutes, GRPCRoutes HTTPS: HTTPRoutes, GRPCRoutes, TLSRoutes TLS: TLSRoutes, TCPRoutes TCP: TCPRoutes UDP:\tUDPRoutes", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ diff --git a/site-src/concepts/api-overview.md b/site-src/concepts/api-overview.md index 896961d4a5..cb3aff8faa 100644 --- a/site-src/concepts/api-overview.md +++ b/site-src/concepts/api-overview.md @@ -260,6 +260,17 @@ following mechanisms: If none of the above are specified, a Gateway listener will trust Routes attached from the same namespace that support the listener protocol. +The following table shows the **Route kinds** compatible for each **protocolType** + +|protocolType|core kind/s compatible| +|------------|----------------------| +| HTTP | HTTPRoutes, GRPCRoutes | +| HTTPS | HTTPRoutes, GRPCRoutes, TLSRoutes | +| TLS | TLSRoutes, TCPRoutes | +| TCP | TCPRoutes | +| UDP | UDPRoutes | + + #### Further Gateway - Route attachment examples The following `my-route` Route wants to attach to the `foo-gateway` in the