Traffic Setting
Traffic Settings allow configuring the behavior of the proxy workloads in a set of namespaces owned by a traffic group. Specifically, it allows configuring the dependencies of proxy workloads on namespaces outside the traffic group as well as reliability settings for outbound calls made by the proxy workloads to other services.
The following example creates a traffic group for the proxy workloads in
ns1
, ns2
and ns3
namespaces owned by its parent workspace
w1
under tenant mycompany
. It then defines a traffic setting
for the all workloads in these namespaces, adding a dependency on
all the services in the shared db
namespace, and forwarding all
unknown traffic via the egress gateway in the istio-system
namespace.
apiVersion: traffic.tsb.tetrate.io/v2
kind: Group
metadata:
name: t1
workspace: w1
tenant: mycompany
organization: myorg
spec:
namespaceSelector:
names:
- "*/ns1"
- "*/ns2"
- "*/ns3"
configMode: BRIDGED
And the associated traffic settings for the proxy workloads:
apiVersion: traffic.tsb.tetrate.io/v2
kind: TrafficSetting
metadata:
name: defaults
group: t1
workspace: w1
tenant: mycompany
organization: myorg
spec:
reachability:
mode: CUSTOM
hosts:
- "ns1/*"
- "ns2/*"
- "ns3/*"
- "db/*"
resilience:
circuitBreakerSensitivity: MEDIUM
egress:
host: istio-system/istio-egressgateway
The following traffic setting confines the reachability of proxy workloads
in the traffic group t1
to other namespaces inside the group. The
resilience and egress gateway settings will be inherited from the
workspace wide traffic setting.
apiVersion: traffic.tsb.tetrate.io/v2
kind: TrafficSetting
metadata:
name: defaults
group: t1
workspace: w1
tenant: mycompany
organization: myorg
spec:
reachability:
mode: GROUP
HTTPRetry
HTTPRetry defines the parameters for retrying API calls to a service.
Field | Description | Validation Rule |
attempts | int32 | int32 = { |
perTryTimeout | google.protobuf.Duration | – |
retryOn | string | string = { |
KeepAliveSettings
Keep Alive Settings.
Field | Description | Validation Rule |
tcp | tetrateio.api.tsb.traffic.v2.KeepAliveSettings.TcpKeepAliveSettings | – |
TcpKeepAliveSettings
TCP Keep Alive Settings.
Field | Description | Validation Rule |
downstream | tetrateio.api.tsb.traffic.v2.KeepAliveSettings.TcpKeepAliveSettings.TcpKeepAlive | – |
upstream | tetrateio.api.tsb.traffic.v2.KeepAliveSettings.TcpKeepAliveSettings.TcpKeepAlive | – |
TcpKeepAlive
Field | Description | Validation Rule |
probes | google.protobuf.UInt32Value | – |
idleTime | google.protobuf.UInt32Value | – |
interval | google.protobuf.UInt32Value | – |
ReachabilitySettings
ReachabilitySettings
define the set of services and hosts
accessed by a workload (and hence its sidecar) in the
mesh. Defining the set of services accessed by a workload (i.e. its
dependencies) in advance reduces the memory and CPU consumption
both the Istio control plane and the individual Envoy proxy workloads in
the data plane.
Field | Description | Validation Rule |
mode | tetrateio.api.tsb.traffic.v2.ReachabilitySettings.Mode | – |
hosts | List of string | – |
Mode
A short cut for defining the common reachability patterns
Name | Number | Description |
UNSET | 0 | Inherit from parent if possible. Otherwise treated as |
NAMESPACE | 1 | The workload may talk to any service in its own namespace. |
GROUP | 2 | The workload may talk to any service in the traffic group. |
WORKSPACE | 3 | The workload may talk to any service in the workspace. |
CLUSTER | 4 | The workload may talk to any service in the cluster. |
CUSTOM | 5 | The workload may talk to services defined explicitly. |
ResilienceSettings
ResilienceSettings control the reliability knobs in Envoy when making outbound connections from a gateway or proxy workload.
Field | Description | Validation Rule |
httpRequestTimeout | google.protobuf.Duration | – |
httpRetries | tetrateio.api.tsb.traffic.v2.HTTPRetry | – |
tcpKeepalive | google.protobuf.BoolValue | – |
keepAlive | tetrateio.api.tsb.traffic.v2.KeepAliveSettings | – |
circuitBreakerSensitivity | tetrateio.api.tsb.traffic.v2.ResilienceSettings.Sensitivity | – |
Sensitivity
Available sensitivity levels for the circuit breaker.
Name | Number | Description |
UNSET | 0 | Default values will be used. |
LOW | 1 | Tolerate up to 20 consecutive 5xx or connection failures from an endpoint before ejecting it temporarily from the load balancing pool. |
MEDIUM | 2 | Tolerate up to 10 consecutive 5xx or connection failures from an endpoint before ejecting it temporarily from the load balancing pool. |
HIGH | 3 | Tolerate up to 5 consecutive 5xx or connection failures from an endpoint before ejecting it temporarily from the load balancing pool. |
TrafficSetting
A traffic setting applies configuration to a set of proxy workloads in a traffic group or a workspace. When applied to a traffic group, missing fields will inherit values from the workspace-wide setting if any.
Field | Description | Validation Rule |
reachability | tetrateio.api.tsb.traffic.v2.ReachabilitySettings | – |
resilience | tetrateio.api.tsb.traffic.v2.ResilienceSettings | – |
egress | tetrateio.api.tsb.traffic.v2.TrafficSetting.EgressGateway | – |
rateLimiting | tetrateio.api.tsb.gateway.v2.RateLimiting | – |
EgressGateway
EgressGateway specifies the gateway where traffic external to the mesh will be redirected.
Field | Description | Validation Rule |
host | string | string = { |
port | int32 | – |