-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grpc-jexpress-template
: Update envoy.yml syntax to envoy1.31-latest (
#104) made envoy.yml compatible to envoy1.31-latest Co-authored-by: Aravindh Vasu <[email protected]>
- Loading branch information
1 parent
b1e8abb
commit 3026af5
Showing
3 changed files
with
61 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,63 @@ | ||
admin: | ||
access_log_path: /tmp/admin-access.log | ||
address: | ||
socket_address: { address: 0.0.0.0, port_value: 9901 } | ||
access_log_path: /tmp/admin-access.log | ||
address: | ||
socket_address: | ||
address: 0.0.0.0 | ||
port_value: 9901 | ||
|
||
static_resources: | ||
listeners: | ||
- name: listener1 | ||
address: | ||
socket_address: { address: 0.0.0.0, port_value: 51051 } | ||
filter_chains: | ||
- filters: | ||
- name: envoy.http_connection_manager | ||
config: | ||
stat_prefix: grpc_json | ||
codec_type: AUTO | ||
route_config: | ||
name: local_route | ||
virtual_hosts: | ||
- name: local_service | ||
domains: ["*"] | ||
routes: | ||
- match: { prefix: "/" , grpc: {}} | ||
route: { cluster: grpc, timeout: { seconds: 60 } } | ||
http_filters: | ||
- name: envoy.grpc_json_transcoder | ||
config: | ||
proto_descriptor: "/tmp/sample_proto_descriptor_set.pb" | ||
services: ["service.UserService"] | ||
print_options: | ||
add_whitespace: true | ||
always_print_primitive_fields: true | ||
always_print_enums_as_ints: false | ||
preserve_proto_field_names: false | ||
- name: envoy.router | ||
listeners: | ||
- name: listener1 | ||
address: | ||
socket_address: | ||
address: 0.0.0.0 | ||
port_value: 51051 | ||
filter_chains: | ||
- filters: | ||
- name: envoy.http_connection_manager | ||
typed_config: | ||
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
stat_prefix: grpc_json | ||
codec_type: AUTO | ||
route_config: | ||
name: local_route | ||
virtual_hosts: | ||
- name: local_service | ||
domains: ["*"] | ||
routes: | ||
- match: | ||
prefix: "/" | ||
route: | ||
cluster: grpc | ||
timeout: { seconds: 60 } | ||
http_filters: | ||
- name: envoy.grpc_json_transcoder | ||
typed_config: | ||
'@type': type.googleapis.com/envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder | ||
proto_descriptor: "/tmp/sample_proto_descriptor_set.pb" | ||
services: ["service.UserService"] | ||
print_options: | ||
add_whitespace: true | ||
always_print_primitive_fields: true | ||
always_print_enums_as_ints: false | ||
preserve_proto_field_names: false | ||
- name: envoy.router | ||
typed_config: | ||
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router | ||
|
||
clusters: | ||
- name: grpc | ||
connect_timeout: 1.25s | ||
type: logical_dns | ||
lb_policy: round_robin | ||
dns_lookup_family: V4_ONLY | ||
http2_protocol_options: {} | ||
hosts: | ||
- socket_address: | ||
address: docker.for.mac.localhost | ||
port_value: 50051 | ||
clusters: | ||
- name: grpc | ||
connect_timeout: 1.25s | ||
type: LOGICAL_DNS | ||
lb_policy: ROUND_ROBIN | ||
dns_lookup_family: V4_ONLY | ||
http2_protocol_options: {} | ||
load_assignment: | ||
cluster_name: grpc | ||
endpoints: | ||
- lb_endpoints: | ||
- endpoint: | ||
address: | ||
socket_address: | ||
address: host.docker.internal | ||
port_value: 50051 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo docker run -it --rm --name envoy -p 51051:51051 -p 9901:9901 -v "$(pwd)/sample_proto_descriptor_set.pb:/tmp/sample_proto_descriptor_set.pb:ro" -v "$(pwd)/envoy.yml:/etc/envoy/envoy.yaml:ro" envoyproxy/envoy | ||
# envoy doesn't support a latest tag anymore, so find the latest version and use it accordingly | ||
sudo docker run -it --rm --name envoy -p 51051:51051 -p 9901:9901 -v "$(pwd)/sample_proto_descriptor_set.pb:/tmp/sample_proto_descriptor_set.pb:ro" -v "$(pwd)/envoy.yml:/etc/envoy/envoy.yaml:ro" envoyproxy/envoy:v1.31-latest |