/
3scale-gateway.json
312 lines (312 loc) · 12.6 KB
/
3scale-gateway.json
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
{
"apiVersion": "v1",
"kind": "Template",
"metadata": {
"annotations": {
"description": "3scale's APIcast is an NGINX based API gateway used to integrate your internal and external API services with 3scale's API Management Platform. It supports OpenID connect to integrate with external Identity Providers such as Red Hat Single Sign On, for API traffic authentication",
"iconClass": "icon-3scale",
"openshift.io/display-name": "3scale APIcast API Gateway",
"openshift.io/documentation-url": "https://access.redhat.com/documentation/en-us/red_hat_3scale/2.saas/html/deployment_options/apicast-openshift",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"tags": "api,gateway,3scale"
},
"name": "3scale-gateway"
},
"objects": [
{
"apiVersion": "v1",
"kind": "DeploymentConfig",
"metadata": {
"name": "${APICAST_NAME}"
},
"spec": {
"replicas": 1,
"selector": {
"deploymentconfig": "${APICAST_NAME}"
},
"strategy": {
"type": "Rolling"
},
"template": {
"metadata": {
"annotations": {
"prometheus.io/port": "9421",
"prometheus.io/scrape": "true"
},
"labels": {
"deploymentconfig": "${APICAST_NAME}"
}
},
"spec": {
"containers": [
{
"env": [
{
"name": "THREESCALE_PORTAL_ENDPOINT",
"valueFrom": {
"secretKeyRef": {
"key": "password",
"name": "apicast-configuration-url-secret"
}
}
},
{
"name": "THREESCALE_CONFIG_FILE",
"value": "${CONFIGURATION_FILE_PATH}"
},
{
"name": "THREESCALE_DEPLOYMENT_ENV",
"value": "${DEPLOYMENT_ENVIRONMENT}"
},
{
"name": "RESOLVER",
"value": "${RESOLVER}"
},
{
"name": "APICAST_SERVICES_LIST",
"value": "${SERVICES_LIST}"
},
{
"name": "APICAST_CONFIGURATION_LOADER",
"value": "${CONFIGURATION_LOADER}"
},
{
"name": "APICAST_LOG_LEVEL",
"value": "${LOG_LEVEL}"
},
{
"name": "APICAST_PATH_ROUTING",
"value": "${PATH_ROUTING}"
},
{
"name": "APICAST_RESPONSE_CODES",
"value": "${RESPONSE_CODES}"
},
{
"name": "APICAST_CONFIGURATION_CACHE",
"value": "${CONFIGURATION_CACHE}"
},
{
"name": "REDIS_URL",
"value": "${REDIS_URL}"
},
{
"name": "APICAST_MANAGEMENT_API",
"value": "${MANAGEMENT_API}"
},
{
"name": "OPENSSL_VERIFY",
"value": "${OPENSSL_VERIFY}"
}
],
"image": "${AMP_APICAST_IMAGE}",
"imagePullPolicy": "IfNotPresent",
"livenessProbe": {
"httpGet": {
"path": "/status/live",
"port": "management"
},
"initialDelaySeconds": 10,
"timeoutSeconds": 1
},
"name": "${APICAST_NAME}",
"ports": [
{
"containerPort": 8080,
"name": "proxy",
"protocol": "TCP"
},
{
"containerPort": 8090,
"name": "management",
"protocol": "TCP"
},
{
"containerPort": 9421,
"name": "metrics",
"protocol": "TCP"
}
],
"readinessProbe": {
"httpGet": {
"path": "/status/ready",
"port": "management"
},
"initialDelaySeconds": 15,
"timeoutSeconds": 1
},
"resources": {
"limits": {
"cpu": "1",
"memory": "128Mi"
},
"requests": {
"cpu": "500m",
"memory": "64Mi"
}
}
}
]
}
},
"triggers": [
{
"type": "ConfigChange"
},
{
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APICAST_NAME}"
],
"from": {
"kind": "ImageStreamTag",
"name": "apicast-gateway:latest",
"namespace": "openshift"
}
},
"type": "ImageChange"
}
]
}
},
{
"apiVersion": "v1",
"kind": "Service",
"metadata": {
"name": "${APICAST_NAME}"
},
"spec": {
"ports": [
{
"name": "proxy",
"port": 8080,
"protocol": "TCP",
"targetPort": 8080
},
{
"name": "management",
"port": 8090,
"protocol": "TCP",
"targetPort": 8090
}
],
"selector": {
"deploymentconfig": "${APICAST_NAME}"
}
}
},
{
"apiVersion": "v1",
"kind": "Secret",
"metadata": {
"name": "apicast-configuration-url-secret"
},
"stringData": {
"password": "https://${ACCESS_TOKEN}@${DOMAIN}-admin.3scale.net"
},
"type": "Opaque"
}
],
"parameters": [
{
"description": "AMP release tag.",
"name": "AMP_RELEASE",
"required": true,
"value": "2.7.0"
},
{
"description": "Access Token (not a Service Token) for the 3scale Account Management API",
"name": "ACCESS_TOKEN",
"required": true,
"value": null
},
{
"description": "The domain found on the URL of your 3scale Admin Portal: https://<domain>-admin.3scale.net",
"name": "DOMAIN",
"required": true,
"value": null
},
{
"name": "AMP_APICAST_IMAGE",
"required": true,
"value": "amp-apicast:latest"
},
{
"description": "Path to saved JSON file with configuration for the gateway. Has to be injected to the container image as read only volume.",
"name": "CONFIGURATION_FILE_PATH",
"required": false,
"value": null
},
{
"description": "Deployment environment. Can be staging or production.",
"name": "DEPLOYMENT_ENVIRONMENT",
"required": true,
"value": "production"
},
{
"description": "Name for the 3scale API Gateway",
"name": "APICAST_NAME",
"required": true,
"value": "apicast"
},
{
"description": "DNS Resolver for openresty, if empty it will be autodiscovered",
"name": "RESOLVER",
"required": false,
"value": null
},
{
"description": "Subset of services to run. Use comma separated list of service ids (eg. 42,1337)",
"name": "SERVICES_LIST",
"required": false,
"value": null
},
{
"description": "When to load configuration. If on gateway start or incoming request. Allowed values are: lazy, boot.",
"name": "CONFIGURATION_LOADER",
"required": false,
"value": "boot"
},
{
"description": "Log level. One of the following: debug, info, notice, warn, error, crit, alert, or emerg.",
"name": "LOG_LEVEL",
"required": false
},
{
"description": "Enable path routing. Experimental feature.",
"name": "PATH_ROUTING",
"required": false,
"value": "false"
},
{
"description": "Enable logging response codes to 3scale.",
"name": "RESPONSE_CODES",
"required": false,
"value": "false"
},
{
"description": "For how long to cache the downloaded configuration in seconds. Can be left empty, 0 or greater than 60.",
"name": "CONFIGURATION_CACHE",
"required": false,
"value": ""
},
{
"description": "Redis URL. Required for OAuth2 integration. ex: redis://PASSWORD@127.0.0.1:6379/0",
"name": "REDIS_URL",
"required": false
},
{
"description": "Scope of the Management API. Can be disabled, status or debug. At least status required for health checks.",
"name": "MANAGEMENT_API",
"required": false,
"value": "status"
},
{
"description": "Turn on/off the OpenSSL peer verification. Can be set to true/false.",
"name": "OPENSSL_VERIFY",
"required": true,
"value": "false"
}
]
}