-
Notifications
You must be signed in to change notification settings - Fork 10
/
envoy.yaml
127 lines (126 loc) · 4.41 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
static_resources:
listeners:
- name: main
address:
socket_address:
address: 0.0.0.0
port_value: 80
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: ingress_http
codec_type: auto
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains:
- "*"
# Plugin config here applies to the VirtualHost
#
# typed_per_filter_config:
# proxy.filters.http.rider:
# "@type": type.googleapis.com/proxy.filters.http.rider.v3alpha1.RouteFilterConfig
# plugins:
routes:
- match:
prefix: "/static-to-header"
route:
cluster: web_service
# Plugin config here applies to the Route
#
# plugins is a list of plugin route configs. Each entry has a name and its config.
# The filter will look up the list by order given a plugin name, and use the first match entry.
typed_per_filter_config:
proxy.filters.http.rider:
"@type": type.googleapis.com/proxy.filters.http.rider.v3alpha1.RouteFilterConfig
plugins:
- name: echo
config:
message: "Lua is awesome!"
source: Static
destination: Header
header_name: x-echo-foo
- match:
prefix: "/external-to-body"
route:
cluster: web_service
typed_per_filter_config:
proxy.filters.http.rider:
"@type": type.googleapis.com/proxy.filters.http.rider.v3alpha1.RouteFilterConfig
plugins:
- name: echo
config:
external_service: example_service
external_service_authority: example.com
source: External
destination: Body
- match:
prefix: "/body-to-body"
route:
cluster: web_service
typed_per_filter_config:
proxy.filters.http.rider:
"@type": type.googleapis.com/proxy.filters.http.rider.v3alpha1.RouteFilterConfig
plugins:
- name: echo
config:
source: Body
destination: Body
- match:
prefix: "/"
route:
cluster: web_service
http_filters:
- name: proxy.filters.http.rider
typed_config:
"@type": type.googleapis.com/proxy.filters.http.rider.v3alpha1.FilterConfig
plugin:
vm_config:
package_path: "/usr/local/lib/rider/?/init.lua;/usr/local/lib/rider/?.lua;"
code:
local:
filename: /usr/local/lib/rider/examples/echo/echo.lua
name: echo
config:
message: "C++ is awesome!"
source: Static
destination: Body
- name: envoy.filters.http.router
typed_config: {}
clusters:
- name: web_service
connect_timeout: 1s
type: strict_dns
lb_policy: round_robin
load_assignment:
cluster_name: web_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: web_service
port_value: 80
- name: example_service
connect_timeout: 1s
type: strict_dns
lb_policy: round_robin
dns_lookup_family: V4_ONLY
load_assignment:
cluster_name: example_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: example.com
port_value: 80
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8001