Gateway API
TCP Routes
API reference for TCP Routes (gateway.apoxy.dev/v1alpha2)
API Group: gateway.apoxy.dev/v1alpha2
Operations
List TCP Routes
GET/apis/gateway.apoxy.dev/v1alpha2/tcproutes
List TCPRoute
Response
200: OK
Create TCP Route
POST/apis/gateway.apoxy.dev/v1alpha2/tcproutes
Create a TCPRoute
Request Body
Spec fields (TCPRouteSpec):
| Field | Type | Description |
|---|---|---|
parentRefs | ParentReference[] | ParentRefs references the resources (usually Gateways) that a Route wants to be attached to. Note that the referenced parent resource needs to allow this for the attachment to be complete. For Gateways, that means the Gateway needs to allow attachment from Routes of this kind and namespace. For Services, that means the Service must either be in the same namespace for a "producer" route, or the mesh implementation must support and allow "consumer" routes for the referenced Service. ReferenceGrant is not applicable for governing ParentRefs to Services - it is not possible to create a "producer" route for a Service in a different namespace from the Route. There are two kinds of parent resources with "Core" support: * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only) This API may be extended in the future to support additional kinds of parent resources. ParentRefs must be distinct. This means either that: * They select different objects. If this is the case, then parentRef entries are distinct. In terms of fields, this means that the multi-part key defined by group, kind, namespace, and name must be unique across all parentRef entries in the Route. * They do not select different objects, but for each optional field used, each ParentRef that selects the same object must set the same set of optional fields to different values. If one ParentRef sets a combination of optional fields, all must set the same combination. Some examples: * If one ParentRef sets sectionName, all ParentRefs referencing the same object must also set sectionName. * If one ParentRef sets port, all ParentRefs referencing the same object must also set port. * If one ParentRef sets sectionName and port, all ParentRefs referencing the same object must also set sectionName and port. It is possible to separately reference multiple distinct objects that may be collapsed by an implementation. For example, some implementations may choose to merge compatible Gateway Listeners together. If that is the case, the list of routes attached to those resources should also be merged. Note that for ParentRefs that cross namespace boundaries, there are specific rules. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example, Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable other kinds of cross-namespace reference. <gateway:experimental:description> ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service. ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route. </gateway:experimental:description> <gateway:standard:validation:XValidation:message="sectionName must be specified when parentRefs includes 2 or more references to the same parent",rule="self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.namespace) |
rules | TCPRouteRule[] | Rules are a list of TCP matchers and actions. <gateway:experimental:validation:XValidation:message="Rule name must be unique within the route",rule="self.all(l1, !has(l1.name) |
Response
200: OK201: Created202: Accepted
Delete All TCP Routes
DELETE/apis/gateway.apoxy.dev/v1alpha2/tcproutes
Delete collection of TCPRoute
Response
200: OK
Get TCP Route
GET/apis/gateway.apoxy.dev/v1alpha2/tcproutes/{name}
Get the specified TCPRoute
Response
200: OK
Replace TCP Route
PUT/apis/gateway.apoxy.dev/v1alpha2/tcproutes/{name}
Replace the specified TCPRoute
Request Body
Spec fields (TCPRouteSpec):
| Field | Type | Description |
|---|---|---|
parentRefs | ParentReference[] | ParentRefs references the resources (usually Gateways) that a Route wants to be attached to. Note that the referenced parent resource needs to allow this for the attachment to be complete. For Gateways, that means the Gateway needs to allow attachment from Routes of this kind and namespace. For Services, that means the Service must either be in the same namespace for a "producer" route, or the mesh implementation must support and allow "consumer" routes for the referenced Service. ReferenceGrant is not applicable for governing ParentRefs to Services - it is not possible to create a "producer" route for a Service in a different namespace from the Route. There are two kinds of parent resources with "Core" support: * Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only) This API may be extended in the future to support additional kinds of parent resources. ParentRefs must be distinct. This means either that: * They select different objects. If this is the case, then parentRef entries are distinct. In terms of fields, this means that the multi-part key defined by group, kind, namespace, and name must be unique across all parentRef entries in the Route. * They do not select different objects, but for each optional field used, each ParentRef that selects the same object must set the same set of optional fields to different values. If one ParentRef sets a combination of optional fields, all must set the same combination. Some examples: * If one ParentRef sets sectionName, all ParentRefs referencing the same object must also set sectionName. * If one ParentRef sets port, all ParentRefs referencing the same object must also set port. * If one ParentRef sets sectionName and port, all ParentRefs referencing the same object must also set sectionName and port. It is possible to separately reference multiple distinct objects that may be collapsed by an implementation. For example, some implementations may choose to merge compatible Gateway Listeners together. If that is the case, the list of routes attached to those resources should also be merged. Note that for ParentRefs that cross namespace boundaries, there are specific rules. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example, Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable other kinds of cross-namespace reference. <gateway:experimental:description> ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service. ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route. </gateway:experimental:description> <gateway:standard:validation:XValidation:message="sectionName must be specified when parentRefs includes 2 or more references to the same parent",rule="self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.namespace) |
rules | TCPRouteRule[] | Rules are a list of TCP matchers and actions. <gateway:experimental:validation:XValidation:message="Rule name must be unique within the route",rule="self.all(l1, !has(l1.name) |
Response
200: OK201: Created
Update TCP Route
PATCH/apis/gateway.apoxy.dev/v1alpha2/tcproutes/{name}
Partially update the specified TCPRoute
Response
200: OK201: Created
Delete TCP Route
DELETE/apis/gateway.apoxy.dev/v1alpha2/tcproutes/{name}
Delete a TCPRoute
Response
200: OK202: Accepted