-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathenvoy.yaml
More file actions
145 lines (145 loc) · 6.28 KB
/
envoy.yaml
File metadata and controls
145 lines (145 loc) · 6.28 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
admin:
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 9901
static_resources:
listeners:
- name: listener_0
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 10000
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
scheme_header_transformation:
scheme_to_overwrite: https
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match:
prefix: "/"
route:
cluster: httpbin
http_filters:
- name: wasmdemo
typed_config:
"@type": type.googleapis.com/udpa.type.v1.TypedStruct
type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
value:
config:
name: wasmdemo
vm_config:
runtime: envoy.wasm.runtime.v8
code:
local:
filename: ./main.wasm
configuration:
"@type": "type.googleapis.com/google.protobuf.StringValue"
value: |
{
"grayKey": "userId",
"backendGrayTag": "env",
"uniqueGrayTag": "uuid",
"rules": [
{
"name": "inner-user",
"grayKeyValue": [
"00000001",
"00000005"
]
},
{
"name": "beta-user",
"grayKeyValue": [
"noah",
"00000003"
],
"grayTagKey": "level",
"grayTagValue": [
"level3",
"level5"
]
}
],
"rewrite": {
"host": "apig-oss-integration.oss-cn-hangzhou.aliyuncs.com",
"indexRouting": {
"/": "/mfe/{version}/index.html"
},
"fileRouting": {
"/": "/mfe/{version}",
"/mfe": "/mfe/{version}"
}
},
"skippedPaths": [
"/api/**",
"/v2/**"
],
"indexPaths": [
"/mfe/**/mf-manifest-main.json"
],
"baseDeployment": {
"version": "v1"
},
"grayDeployments": [
{
"weight": 90,
"name": "beta-user",
"version": "v2",
"enabled": true,
"backendVersion":"gray",
"versionPredicates": {
"/mfe": "v1"
}
}
],
"injection": {
"globalConfig": {
"key": "HIGRESS_CONSOLE_CONFIG",
"featureKey": "FEATURE_STATUS",
"value": "{CONSOLE_GLOBAL: {'gray':'2.0.15','main':'2.0.15'}}",
"enabled": true
},
"head": [
"<script>console.log('Header')</script>"
],
"body": {
"first": [
"<script>console.log('hello world before')</script>",
"<script>console.log('hello world before1')</script>"
],
"last": [
"<script>console.log('hello world after')</script>",
"<script>console.log('hello world after2')</script>"
]
}
}
}
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: httpbin
connect_timeout: 30s
type: LOGICAL_DNS
dns_lookup_family: V4_ONLY
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: httpbin
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: apig-oss-integration.oss-cn-hangzhou.aliyuncs.com
port_value: 80