-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvoy.yaml
More file actions
75 lines (74 loc) · 2.53 KB
/
Copy pathenvoy.yaml
File metadata and controls
75 lines (74 loc) · 2.53 KB
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
stats_config:
stats_matcher:
reject_all: true
static_resources:
listeners:
- name: main
address:
socket_address:
address: 0.0.0.0
port_value: 10000
per_connection_buffer_limit_bytes: 12582912
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
generate_request_id: false
stat_prefix: ingress_http
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains:
- "*"
routes:
- match:
prefix: "/"
route:
cluster: cluster0
http_filters:
- name: lua_filter_with_custom_name_0
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
default_source_code:
inline_string: |
function envoy_on_request(req)
require("resty_ffi")
local demo = ngx.load_ffi("ffi_go_basic_auth",
'{"user":"fooname","password":"validpassword"}')
local auth = req:headers():get("Authorization")
local body = req:body()
body = body and body:getBytes(0, body:length()) or "ok"
local tbl = {auth, body}
local data = table.concat(tbl, "\n")
local _, rc, res = demo:auth(data, req)
req:respond({[":status"] = tostring(rc)}, res)
end
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: cluster0
circuit_breakers:
thresholds:
- priority: DEFAULT
max_connections: 1000000000
max_pending_requests: 1000000000
max_requests: 1000000000
max_retries: 1000000000
- priority: HIGH
max_connections: 1000000000
max_pending_requests: 1000000000
max_requests: 1000000000
max_retries: 1000000000
load_assignment:
cluster_name: httpbin
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8080