Tetrate Service BridgeVersion: 1.9.x
Traffic Settings Management
Intro
Resources
- TrafficGroup allow grouping the proxy workloads in a set of namespaces owned by its parent workspace
ServiceRoute
Define versions of services with traffic shifting policiesTrafficSetting
Define behavior of proxy workloads
tsb/traffic/v2
ServiceRoute
Sample
sample/traffic-management/serviceroute.yaml
apiVersion: traffic.tsb.tetrate.io/v2
kind: ServiceRoute
Metadata:
organization: tsbdemo
tenant: bookinfo
workspace: bookinfo-workspace
group: bookinfo-trafficgroup
name: bookinfo-tg-reviews
spec:
service: bookinfo/reviews.bookinfo.svc.cluster.local
stickySession:
useSourceIp: true
subsets:
- name: v1
labels:
version: v1
weight: 50
- name: v2
labels:
version: v2
weight: 50
Fields
Interpretations of fields in the sample
service
: which service configuration will be appliedstickySession
: how to keep traffic from client to a specific backendsubsets
: a list of versions with traffic weights
TrafficSetting
Sample
sample/traffic-management/trafficsetting.yaml
apiVersion: traffic.tsb.tetrate.io/v2
kind: TrafficSetting
metadata:
organization: tsbdemo
tenant: bookinfo
workspace: bookinfo-workspace
group: bookinfo-trafficgroup
name: bookinfo-tg
spec:
resilience:
httpRetries:
attempts: 3
perTryTimeout: 3s
retryOn: 5xx,gateway-error,reset
Fields
Interpretations of fields in the sample
resillience
: traffic reliability knobshttpRetries
: retry policy for all HTTP requests