Skip to content
This repository was archived by the owner on Dec 15, 2024. It is now read-only.

Commit 709b02d

Browse files
committed
[tools] add envoy grpc-web proxy
1 parent 6dad3d6 commit 709b02d

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

tools/envoy/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM envoyproxy/envoy-alpine:v1.13.0
2+
COPY tools/envoy/envoy.yaml /etc/envoy/envoy.yaml
3+

tools/envoy/envoy.yaml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
admin:
2+
access_log_path: /tmp/admin_access.log
3+
address:
4+
socket_address: { address: 0.0.0.0, port_value: 9901 }
5+
6+
static_resources:
7+
listeners:
8+
- name: listener_0
9+
address:
10+
socket_address: { address: 0.0.0.0, port_value: 8080 }
11+
filter_chains:
12+
- filters:
13+
- name: envoy.http_connection_manager
14+
typed_config:
15+
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
16+
codec_type: auto
17+
stat_prefix: ingress_http
18+
route_config:
19+
name: local_route
20+
virtual_hosts:
21+
- name: local_service
22+
domains: ['*']
23+
routes:
24+
- match: { prefix: '/' }
25+
route:
26+
cluster: echo_service
27+
max_grpc_timeout: 5s
28+
cors:
29+
allow_origin_string_match:
30+
- exact: '*'
31+
allow_methods: GET, PUT, DELETE, POST, OPTIONS
32+
allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout
33+
max_age: '1728000'
34+
expose_headers: custom-header-1,grpc-status,grpc-message
35+
36+
http_filters:
37+
- name: envoy.grpc_web
38+
- name: envoy.cors
39+
- name: envoy.router
40+
clusters:
41+
- name: echo_service
42+
connect_timeout: 5s
43+
type: logical_dns
44+
http2_protocol_options: {}
45+
lb_policy: round_robin
46+
load_assignment:
47+
cluster_name: echo_service
48+
endpoints:
49+
- lb_endpoints:
50+
- endpoint:
51+
address:
52+
socket_address: { address: ac.testnet.libra.org, port_value: 8000 }

0 commit comments

Comments
 (0)