-
Notifications
You must be signed in to change notification settings - Fork 583
/
envoy.yaml
135 lines (133 loc) · 4.66 KB
/
envoy.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
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
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8081
cluster_manager:
outlier_detection:
event_log_path: "/dev/stdout"
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
stat_prefix: ingress_http
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match: { prefix: "/oai" }
route: { cluster: openapi }
- match: { prefix: "/gql" }
route: { cluster: graphql_server }
- match:
{ prefix: "/coolstore.CatalogService/", grpc: {} }
route:
{
cluster: catalog_grpc_service,
max_grpc_timeout: 0s,
}
- match: { prefix: "/coolstore.CartService/", grpc: {} }
route:
{ cluster: cart_grpc_service, max_grpc_timeout: 0s }
- match:
{ prefix: "/coolstore.InventoryService/", grpc: {} }
route:
{
cluster: inventory_grpc_service,
max_grpc_timeout: 0s,
}
- match:
{ prefix: "/coolstore.RatingService/", grpc: {} }
route:
{
cluster: rating_grpc_service,
max_grpc_timeout: 0s,
}
cors:
allow_origin:
- "*"
allow_methods: GET, PUT, DELETE, POST, OPTIONS
allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout
max_age: "1728000"
enabled: true
http_filters:
- name: envoy.grpc_json_transcoder
config:
proto_descriptor: /tmp/envoy/proto.pb
services:
[
coolstore.CartService,
coolstore.InventoryService,
coolstore.CatalogService,
coolstore.RatingService,
]
print_options:
add_whitespace: true
always_print_primitive_fields: true
always_print_enums_as_ints: false
preserve_proto_field_names: false
- name: envoy.cors
- name: envoy.router
clusters:
- name: openapi
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: openapi
port_value: 5010
- name: graphql_server
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
hosts:
- socket_address:
address: graphql-service
port_value: 5011
- name: catalog_grpc_service
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
http2_protocol_options: {}
hosts:
- socket_address:
address: catalog-service
port_value: 5002
- name: cart_grpc_service
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
http2_protocol_options: {}
hosts:
- socket_address:
address: cart-service
port_value: 5003
- name: inventory_grpc_service
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
http2_protocol_options: {}
hosts:
- socket_address:
address: inventory-service
port_value: 5004
- name: rating_grpc_service
connect_timeout: 0.25s
type: logical_dns
lb_policy: round_robin
http2_protocol_options: {}
hosts:
- socket_address:
address: rating-service
port_value: 5007