NetworkServicesTCPRoute
Property | Value |
---|---|
Google Cloud Service Name | Network Services |
Google Cloud Service Documentation | /traffic-director/docs/ |
Google Cloud REST Resource Name | v1/projects.locations.tcpRoutes |
Google Cloud REST Resource Documentation | /traffic-director/docs/reference/network-services/rest/v1/projects.locations.tcpRoutes |
Config Connector Resource Short Names | gcpnetworkservicestcproute gcpnetworkservicestcproutes networkservicestcproute |
Config Connector Service Name | networkservices.googleapis.com |
Config Connector Resource Fully Qualified Name | networkservicestcproutes.networkservices.cnrm.cloud.google.com |
Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
Config Connector Default Average Reconcile Interval In Seconds | 600 |
Custom Resource Definition Properties
Spec
Schema
description: string
gateways:
- external: string
name: string
namespace: string
location: string
meshes:
- external: string
name: string
namespace: string
projectRef:
external: string
name: string
namespace: string
resourceID: string
rules:
- action:
destinations:
- serviceRef:
external: string
name: string
namespace: string
weight: integer
originalDestination: boolean
matches:
- address: string
port: string
Fields | |
---|---|
Optional |
Optional. A free-text description of the resource. Max length 1024 characters. |
Optional |
|
Optional |
|
Optional |
Allowed value: The `selfLink` field of a `NetworkServicesGateway` resource. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Required |
Immutable. The location for the resource |
Optional |
|
Optional |
|
Optional |
Allowed value: The `selfLink` field of a `NetworkServicesMesh` resource. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Required |
Immutable. The Project that this resource belongs to. |
Optional |
The project for the resource Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`). |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. |
Required |
Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match. |
Required |
|
Required |
Required. The detailed rule defining how to route matched traffic. |
Optional |
Optional. The destination services to which traffic should be forwarded. At least one destination service is required. |
Optional |
|
Required* |
|
Optional |
Required. The URL of a BackendService to route traffic to. Allowed value: The Google Cloud resource name of a `ComputeBackendService` resource (format: `projects/{{project}}/global/backendServices/{{name}}`). |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them. |
Optional |
Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. |
Optional |
Optional. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are “OR”ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic. |
Optional |
|
Required* |
Required. Must be specified in the CIDR range format. A CIDR range consists of an IP Address and a prefix length to construct the subnet mask. By default, the prefix length is 32 (i.e. matches a single IP address). Only IPV4 addresses are supported. Examples: “10.0.0.1” - matches against this exact IP address. “10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" - matches against any IP address'. |
Required* |
Required. Specifies the destination port to match against. |
* Field is required when parent field is specified
Status
Schema
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
createTime: string
observedGeneration: integer
selfLink: string
updateTime: string
Fields | |
---|---|
conditions |
Conditions represent the latest available observation of the resource's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
createTime |
Output only. The timestamp when the resource was created. |
observedGeneration |
ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
selfLink |
Output only. Server-defined URL of this resource |
updateTime |
Output only. The timestamp when the resource was updated. |
Sample YAML(s)
Typical Use Case
# Copyright 2022 Google LLC
#
# 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.
apiVersion: networkservices.cnrm.cloud.google.com/v1beta1
kind: NetworkServicesTCPRoute
metadata:
name: networkservicestcproute-sample
labels:
foo: bar
spec:
meshes:
- name: "networkservicestcproute-dep"
gateways:
- name: "networkservicestcproute-dep"
location: "global"
description: "A test TcpRoute"
rules:
- matches:
- address: "10.0.0.1/32"
port: "7777"
action:
destinations:
- serviceRef:
name: "networkservicestcproute-dep"
weight: 1
- matches:
- address: "10.0.0.1/0"
port: "1"
action:
originalDestination: false
destinations:
- serviceRef:
name: "networkservicestcproute-dep"
weight: 1
projectRef:
# Replace "${PROJECT_ID?}" with your project ID
external: "projects/${PROJECT_ID?}"
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeBackendService
metadata:
name: networkservicestcproute-dep
spec:
loadBalancingScheme: "INTERNAL_SELF_MANAGED"
location: global
projectRef:
# Replace "${PROJECT_ID?}" with your project ID
external: "projects/${PROJECT_ID?}"
---
apiVersion: networkservices.cnrm.cloud.google.com/v1beta1
kind: NetworkServicesGateway
metadata:
name: networkservicestcproute-dep
labels:
foo: bar
spec:
description: "A test Gateway"
type: "OPEN_MESH"
ports:
- 80
- 443
location: "global"
scope: "networkservicestcproute-sample"
projectRef:
# Replace "${PROJECT_ID?}" with your project ID
external: "projects/${PROJECT_ID?}"
---
apiVersion: networkservices.cnrm.cloud.google.com/v1beta1
kind: NetworkServicesMesh
metadata:
name: networkservicestcproute-dep
spec:
location: "global"
projectRef:
# Replace "${PROJECT_ID?}" with your project ID
external: "projects/${PROJECT_ID?}"