-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathenvoyFilter.yaml
78 lines (78 loc) · 2.56 KB
/
envoyFilter.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: trace-filter
labels:
workload-type: pod
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_OUTBOUND
listener:
filterChain:
filter:
name: envoy.filters.network.http_connection_manager
subFilter:
name: envoy.filters.http.router
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
typedConfig:
'@type': type.googleapis.com/udpa.type.v1.TypedStruct
typeUrl: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
value:
config:
name: trace-outbound-filter
rootId: trace-outbound-filter
configuration:
"@type": "type.googleapis.com/google.protobuf.StringValue"
value: |
{{PLUGIN_CONFIG}}
vmConfig:
code:
local:
filename: /var/local/lib/wasm-filters/http-trace-filter.wasm
runtime: envoy.wasm.runtime.v8
vmId: trace-outbound-filter
- applyTo: CLUSTER
match:
context: SIDECAR_OUTBOUND
patch:
operation: ADD
value: # cluster specification
name: trace_analyzer
type: LOGICAL_DNS
connect_timeout: 0.5s
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: trace_analyzer
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
protocol: TCP
address: {{WASM_FILTER_TRACE_BACKEND_ADDRESS}}
port_value: {{WASM_FILTER_TRACE_BACKEND_PORT}}
- applyTo: CLUSTER
match:
context: SIDECAR_OUTBOUND
patch:
operation: ADD
value: # cluster specification
name: trace-sampling-manager
type: LOGICAL_DNS
connect_timeout: 0.5s
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: trace-sampling-manager
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
protocol: TCP
address: {{WASM_FILTER_TRACE_BACKEND_ADDRESS}}
port_value: {{WASM_FILTER_TRACE_SAMPLING_PORT}}