-
Notifications
You must be signed in to change notification settings - Fork 0
/
kong-template.yml
106 lines (106 loc) · 2.06 KB
/
kong-template.yml
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
_format_version: "1.1"
services:
- name: ping
url: ${PING_URL}
read_timeout: ${PING_RESPONSE_TIMEOUT}
routes:
- name: ping
strip_path: true
paths: [
"/ping"
]
methods: [
"POST",
"GET"
]
- name: health
strip_path: false
paths: [
"/health"
]
methods: [
"GET"
]
- name: meta
url: ${META_URL}
read_timeout: ${META_RESPONSE_TIMEOUT}
routes:
- name: meta
strip_path: true
paths: [
"/metadata"
]
methods: [
"POST",
"GET",
"PATCH"
]
- name: history
url: ${HISTORY_URL}
read_timeout: ${HISTORY_RESPONSE_TIMEOUT}
routes:
- name: history
strip_path: true
paths: [
"/history"
]
methods: [
"GET"
]
- name: auth
url: ${AUTH_SERVICE_URL}
read_timeout: ${AUTH_RESPONSE_TIMEOUT}
routes:
- name: auth
strip_path: true
paths: [
"/auth"
]
methods: [
"POST",
"GET"
]
plugins:
- name: rls-auth
service: ping
route: ping
config:
request:
authURL: ${AUTH_URL}
authTimeout: ${AUTH_TIMEOUT}
cacheTTL: ${AUTH_CACHE_TTL}
- name: rls-auth
service: meta
route: meta
config:
request:
authURL: ${AUTH_URL}
authTimeout: ${AUTH_TIMEOUT}
cacheTTL: ${AUTH_CACHE_TTL}
- name: rls-auth
service: history
route: history
config:
request:
authURL: ${AUTH_URL}
authTimeout: ${AUTH_TIMEOUT}
cacheTTL: ${AUTH_CACHE_TTL}
- name: rls-auth
service: auth
route: auth
config:
request:
authURL: ${AUTH_URL}
authTimeout: ${AUTH_TIMEOUT}
cacheTTL: ${AUTH_CACHE_TTL}
- name: rate-limiting
route: ping
config:
second: ${PING_RATE_LIMIT_PER_SEC}
minute: ${PING_RATE_LIMIT_PER_MIN}
policy: ${PING_RATE_LIMIT_POLICY}
- name: request-termination
route: health
config:
status_code: 200
message: Ok!