forked from 3scale/APIcast
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapicast-template.yml
220 lines (216 loc) · 6.63 KB
/
apicast-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
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
apiVersion: v1
kind: Template
labels:
template: apicast
metadata:
name: 3scale-gateway
annotations:
description: "3scale API Gateway"
iconClass: "icon-load-balancer"
tags: "api,gateway,3scale"
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
service: apicast
name: "${APICAST_NAME}"
spec:
replicas: ${{REPLICAS}}
selector:
deploymentconfig: "${APICAST_NAME}"
strategy:
type: Rolling
template:
metadata:
labels:
deploymentconfig: "${APICAST_NAME}"
spec:
containers:
- env:
- name: THREESCALE_PORTAL_ENDPOINT
valueFrom:
secretKeyRef:
name: "${CONFIGURATION_URL_SECRET}"
key: password
- 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}"
- name: APICAST_REPORTING_THREADS
value: "${REPORTING_THREADS}"
- name: APICAST_WORKERS
value: "${APICAST_WORKERS}"
- name: APICAST_LOAD_SERVICES_WHEN_NEEDED
value: "${APICAST_LOAD_SERVICES_WHEN_NEEDED}"
image: "${IMAGE_NAME}"
imagePullPolicy: Always
name: "${APICAST_NAME}"
livenessProbe:
httpGet:
path: /status/live
port: management
initialDelaySeconds: 10
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /status/ready
port: management
initialDelaySeconds: 15
timeoutSeconds: 1
resources:
requests:
memory: ${{MEMORY_REQUEST}}
cpu: ${{CPU_REQUEST}}
limits:
memory: ${{MEMORY_LIMIT}}
cpu: ${CPU_LIMIT}
ports:
- name: proxy
containerPort: 8080
protocol: TCP
- name: management
containerPort: 8090
protocol: TCP
imagePullSecrets:
- name: ${IMAGE_PULL_SECRET_NAME}
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
labels:
template: apicast
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}"
parameters:
- description: "Name of the secret containing the THREESCALE_PORTAL_ENDPOINT with the access-token or provider key"
value: apicast-configuration-url-secret
name: CONFIGURATION_URL_SECRET
required: true
- description: "Path to saved JSON file with configuration for the gateway. Has to be injected to the container image as read only volume."
value:
name: CONFIGURATION_FILE_PATH
required: false
- description: "Container image to use."
value: 'quay.io/3scale/apicast:master'
name: IMAGE_NAME
- description: "Deployment environment. Can be sandbox or production."
value: production
name: DEPLOYMENT_ENVIRONMENT
required: true
- description: "Name for the 3scale API Gateway"
value: apicast
name: APICAST_NAME
required: true
- description: "Number of worker processes to start."
name: APICAST_WORKERS
required: false
- description: "DNS Resolver for openresty, if empty it will be autodiscovered"
value:
name: RESOLVER
required: false
- description: "Subset of services to run. Use comma separated list of service ids (eg. 42,1337)"
value:
name: SERVICES_LIST
required: false
- name: CONFIGURATION_LOADER
description: "When to load configuration. If on gateway start or incoming request. Allowed values are: lazy, boot."
value: boot
required: false
- description: "Log level. One of the following: debug, info, notice, warn, error, crit, alert, or emerg."
name: LOG_LEVEL
required: true
value: "debug"
- description: "Enable path routing. Experimental feature."
name: PATH_ROUTING
required: false
value: "false"
- description: "Enable logging response codes to 3scale."
value: "false"
name: RESPONSE_CODES
required: false
- name: CONFIGURATION_CACHE
description: "For how long to cache the downloaded configuration in seconds. Can be left empty, 0 or greater than 60."
value: ""
required: false
- description: "Redis URL. Required for OAuth2 integration. ex: redis://[email protected]:6379/0"
name: REDIS_URL
required: false
- name: MANAGEMENT_API
description: "Scope of the Management API. Can be disabled, status or debug. At least status required for health checks."
required: false
value: "status"
- name: OPENSSL_VERIFY
description: "Turn on/off the OpenSSL peer verification. Can be set to true/false."
required: true
value: "false"
- name: REPORTING_THREADS
description: "Number of asynchronous reporting threads. Experimental feature."
required: false
value: "0"
- description: Private pull secret name
displayName: Private pull secret name
name: IMAGE_PULL_SECRET_NAME
value: "quay.io"
- description: Request Memory Required by each replica
displayName: Request Memory
required: true
name: MEMORY_REQUEST
value: "512Mi"
- description: Request Number of CPU cores required by each replica
displayName: Request CPU cores
required: true
name: CPU_REQUEST
value: "500m"
- description: Limit Memory Required by each replica
displayName: Limit Memory
required: true
name: MEMORY_LIMIT
value: "2Gi"
- description: Limit Number of CPU cores required by each replica
displayName: Limit CPU cores
required: true
name: CPU_LIMIT
value: "1"
- description: Number of deployment replicas
displayName: Number of deployment replicas
required: true
name: REPLICAS
value: "1"
- description: APICAST LOAD SERVICES WHEN NEEDED
displayName: APICAST LOAD SERVICES WHEN NEEDED
required: false
name: APICAST_LOAD_SERVICES_WHEN_NEEDED
value: "1"