-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathenvoy.yaml
88 lines (88 loc) · 4.05 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
#<- if and .Admin.Port .Admin.Host >#
admin:
address:
socket_address:
address: #< .Admin.Host >#
port_value: #< .Admin.Port >#
#<- end >#
static_resources:
listeners:
- name: listener_0
address:
socket_address:
address: #< .Proxy.Host >#
port_value: #< .Proxy.Port >#
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
stat_prefix: ingress_http
codec_type: AUTO
access_log:
#<- range .AccessLogs >#
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: #< . >#
#<- end >#
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match:
prefix: "/"
route:
cluster: service_0
timeout: #< .Backend.Timeout >#s
typed_per_filter_config:
envoy.filters.http.cors:
"@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.CorsPolicy
allow_origin_string_match:
- prefix: "*"
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,connect-protocol-version,connect-timeout-ms
max_age: "1728000"
expose_headers: grpc-status,grpc-message,grpc-status-details-bin
http_filters:
- name: envoy.filters.http.cors
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors
- name: envoy.filters.http.connect_grpc_bridge
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.connect_grpc_bridge.v3.FilterConfig
- name: envoy.filters.http.grpc_web
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
#<- if and .Rest.Services (or .Rest.ProtoDescriptor .Rest.ProtoDescriptorBin) >#
- name: envoy.filters.http.grpc_json_transcoder
typed_config: #< toJson .Rest 20 >#
#<- end >#
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: service_0
connect_timeout: #< .Cluster.ConnectTimeout >#s
type: #< .Cluster.DiscoveryType >#
lb_policy: #< .Cluster.LoadBalancePolicy >#
dns_lookup_family: #< .Cluster.DnsLookupFamily >#
load_assignment:
cluster_name: service_0
endpoints:
- lb_endpoints:
#<- range .Backend.Ports >#
- endpoint:
address:
socket_address:
address: #< $.Backend.Host >#
port_value: #< . >#
#<- end >#
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
explicit_http_config:
http2_protocol_options:
max_concurrent_streams: #< .Cluster.MaxConcurrentStreams >#