-
Notifications
You must be signed in to change notification settings - Fork 4
/
kong.yml
247 lines (220 loc) · 6.87 KB
/
kong.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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# ------------------------------------------------------------------------------
# This is an example file to get you started with using
# declarative configuration in Kong.
# ------------------------------------------------------------------------------
# Metadata fields start with an underscore (_)
# Fields that do not start with an underscore represent Kong entities and attributes
# _format_version is mandatory,
# it specifies the minimum version of Kong that supports the format
_format_version: "1.1"
# Each Kong entity (core entity or custom entity introduced by a plugin)
# can be listed in the top-level as an array of objects:
services:
- name: course-service
url: http://a2a4f747e638449c79f475b6c41be2f1-1237676453.us-east-1.elb.amazonaws.com/courses
# Entities can store tags as metadata
tags:
- course
# Entities that have a foreign-key relationship can be nested:
routes:
- name: course-route
paths:
- /courses
- name: profile-service
url: https://fkj81t4dqi.execute-api.us-east-1.amazonaws.com/prod/profile
# Entities can store tags as metadata
tags:
- profile
# Entities that have a foreign-key relationship can be nested:
routes:
- name: profile-route
paths:
- /profile
- name: login-service
url: https://fkj81t4dqi.execute-api.us-east-1.amazonaws.com/prod/login
# Entities can store tags as metadata
tags:
- login
# Entities that have a foreign-key relationship can be nested:
routes:
- name: login-route
paths:
- /login
- name: signup-service
url: https://fkj81t4dqi.execute-api.us-east-1.amazonaws.com/prod/signup
# Entities can store tags as metadata
tags:
- signup
# Entities that have a foreign-key relationship can be nested:
routes:
- name: signup-route
paths:
- /signup
- name: announcement-service
url: https://fkj81t4dqi.execute-api.us-east-1.amazonaws.com/prod/announcement
# Entities can store tags as metadata
tags:
- announcement
# Entities that have a foreign-key relationship can be nested:
routes:
- name: announcement-route
paths:
- /announcement
- name: click-count-service
url: http://a42829ec30d9a11eab7a00ef2f3a9be2-243872215.us-east-1.elb.amazonaws.com/click-count
# Entities can store tags as metadata
tags:
- click-count
# Entities that have a foreign-key relationship can be nested:
routes:
- name: click-count-route
paths:
- /click-count
- name: best-performing-courses-service
url: http://a42829ec30d9a11eab7a00ef2f3a9be2-243872215.us-east-1.elb.amazonaws.com/best-performing-courses
# Entities can store tags as metadata
tags:
- best-performing-courses
# Entities that have a foreign-key relationship can be nested:
routes:
- name: best-performing-courses-route
paths:
- /best-performing-courses
- name: publish-announcement-service
url: http://a42829ec30d9a11eab7a00ef2f3a9be2-243872215.us-east-1.elb.amazonaws.com/publish-announcement
# Entities can store tags as metadata
tags:
- publish-announcement
# Entities that have a foreign-key relationship can be nested:
routes:
- name: publish-announcement-route
paths:
- /publish-announcement
- name: addToCart-service
url: http://enrollment-nlb-047c901a12a29dbf.elb.us-west-2.amazonaws.com/addToCart
# Entities can store tags as metadata
tags:
- addToCart
# Entities that have a foreign-key relationship can be nested:
routes:
- name: addToCart-route
paths:
- /addToCart
- name: cart-service
url: http://enrollment-nlb-047c901a12a29dbf.elb.us-west-2.amazonaws.com/cart
# Entities can store tags as metadata
tags:
- cart
# Entities that have a foreign-key relationship can be nested:
routes:
- name: cart-route
paths:
- /cart
- name: enroll-service
url: http://enrollment-nlb-047c901a12a29dbf.elb.us-west-2.amazonaws.com/enroll
# Entities can store tags as metadata
tags:
- enroll
# Entities that have a foreign-key relationship can be nested:
routes:
- name: enroll-route
paths:
- /enroll
- name: enrollment-service
url: http://enrollment-nlb-047c901a12a29dbf.elb.us-west-2.amazonaws.com/enrollment
# Entities can store tags as metadata
tags:
- enrollment
# Entities that have a foreign-key relationship can be nested:
routes:
- name: enrollment-route
paths:
- /enrollment
- name: drop-service
url: http://enrollment-nlb-047c901a12a29dbf.elb.us-west-2.amazonaws.com/drop
# Entities can store tags as metadata
tags:
- drop
# Entities that have a foreign-key relationship can be nested:
routes:
- name: drop-route
paths:
- /drop
- name: getEnrollmentsByCourse-service
url: http://enrollment-nlb-047c901a12a29dbf.elb.us-west-2.amazonaws.com/getEnrollmentsByCourse
# Entities can store tags as metadata
tags:
- getEnrollmentsByCourse
# Entities that have a foreign-key relationship can be nested:
routes:
- name: getEnrollmentsByCourse-route
paths:
- /getEnrollmentsByCourse
- name: grade-service
url: http://a4957e86ba0a841bab4f7a87a1cd66fb-282351883.us-east-1.elb.amazonaws.com/grade
# Entities can store tags as metadata
tags:
- grade
# Entities that have a foreign-key relationship can be nested:
routes:
- name: grade-route
paths:
- /grade
- name: grades-service
url: http://a4957e86ba0a841bab4f7a87a1cd66fb-282351883.us-east-1.elb.amazonaws.com/grades
# Entities can store tags as metadata
tags:
- grades
# Entities that have a foreign-key relationship can be nested:
routes:
- name: grades-route
paths:
- /grades
- name: pay-service
url: http://a4957e86ba0a841bab4f7a87a1cd66fb-282351883.us-east-1.elb.amazonaws.com/pay
# Entities can store tags as metadata
tags:
- pay
# Entities that have a foreign-key relationship can be nested:
routes:
- name: pay-route
paths:
- /pay
# plugins:
# - name: key-auth
# - name: another-service
# url: https://example.org
# routes:
# - name: another-route
# # Relationships can also be specified between top-level entities,
# # either by name or by id
# service: example-service
# hosts: ["hello.com"]
# consumers:
# - username: example-user
# # Custom entities from plugin can also be specified
# # If they specify a foreign-key relationshp, they can also be nested
# keyauth_credentials:
# - key: my-key
# plugins:
# - name: rate-limiting
# _comment: "these are default rate-limits for user example-user"
# config:
# policy: local
# second: 5
# hour: 10000
# When an entity has multiple foreign-key relationships
# (e.g. a plugin matching on both consumer and service)
# it must be specified as a top-level entity, and not through
# nesting.
# plugins:
# - name: rate-limiting
# consumer: example-user
# service: another-service
# _comment: "example-user is extra limited when using another-service"
# config:
# hour: 2
# # tags are for your organization only and have no meaning for Kong:
# tags:
# - extra_limits
# - my_tag