-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpact-broker-template.yml
More file actions
312 lines (312 loc) · 7.36 KB
/
pact-broker-template.yml
File metadata and controls
312 lines (312 loc) · 7.36 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
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:
name: pact-broker
objects:
# IMAGE STREAM
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: pact-broker
name: pact-broker
spec:
lookupPolicy:
local: false
tags:
- annotations: null
from:
kind: DockerImage
name: pact-broker:latest
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ""
status:
dockerImageRepository: ""
# BUILD CONFIG
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
app: pact-broker
name: pact-broker
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: pact-broker:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
contextDir: /pact_broker
git:
ref: master
uri: https://github.com/DiUS/pact_broker-docker.git
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: ruby:2.4
namespace: openshift
type: Source
triggers:
- generic:
secret: 521d59e0275bef66
type: Generic
- github:
secret: e5f2f556f5e438a1
type: GitHub
- imageChange: {}
type: ImageChange
- type: ConfigChange
status:
lastVersion: 0
# DEPLOYMENT CONFIG
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: pact-broker
name: pact-broker
spec:
replicas: 1
selector:
deploymentconfig: pact-broker
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
creationTimestamp: null
labels:
app: pact-broker
deploymentconfig: pact-broker
spec:
containers:
- env:
- name: PACT_BROKER_DATABASE_USERNAME
value: pact_broker
- name: PACT_BROKER_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: postgresql-pact-broker-secret
- name: PACT_BROKER_DATABASE_HOST
value: postgresql-pact-broker
- name: PACT_BROKER_DATABASE_NAME
value: pact_broker
image: pact-broker:latest
imagePullPolicy: Always
name: pact-broker
ports:
- containerPort: 8080
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- imageChangeParams:
automatic: true
containerNames:
- pact-broker
from:
kind: ImageStreamTag
name: pact-broker:latest
type: ImageChange
- type: ConfigChange
status:
availableReplicas: 0
latestVersion: 0
observedGeneration: 0
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
# SERVICE
- apiVersion: v1
kind: Service
metadata:
labels:
app: pact-broker
name: pact-broker
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
deploymentconfig: pact-broker
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: Route
metadata:
creationTimestamp: null
labels:
app: pact-broker
name: pact-broker
spec:
#host: pact-broker.<domain name>.com
port:
targetPort: 8080-tcp
to:
kind: Service
name: pact-broker
weight: 100
wildcardPolicy: None
status:
ingress:
- conditions:
- lastTransitionTime: 2018-03-13T21:39:49Z
status: "True"
type: Admitted
#host: pact-broker.<domain name>.com
routerName: router
wildcardPolicy: None
# SERVICE CONFIG - POSTGRES
- apiVersion: v1
kind: Service
metadata:
name: postgresql-pact-broker
labels:
app: pact-broker
spec:
ports:
- name: postgresql
port: 5432
protocol: TCP
targetPort: 5432
selector:
app: pact-broker
deploymentconfig: postgresql-pact-broker
sessionAffinity: None
type: ClusterIP
# DEPLOYMENT CONFIG - POSTGRES
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: pact-broker
deploymentconfig: postgresql-pact-broker
name: postgresql-pact-broker
spec:
replicas: 1
selector:
app: pact-broker
deploymentconfig: postgresql-pact-broker
strategy:
recreateParams:
timeoutSeconds: 600
resources: {}
type: Recreate
template:
metadata:
labels:
app: pact-broker
deploymentconfig: postgresql-pact-broker
spec:
containers:
- env:
- name: POSTGRESQL_USER
value: pact_broker
- name: POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: postgresql-pact-broker-secret
- name: POSTGRESQL_DATABASE
value: pact_broker
image: ' '
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 5432
timeoutSeconds: 1
name: postgresql
ports:
- containerPort: 5432
protocol: TCP
readinessProbe:
exec:
command:
- /bin/sh
- -i
- -c
- psql -h 127.0.0.1 -U $POSTGRESQL_USER -q -d $POSTGRESQL_DATABASE -c 'SELECT 1'
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
memory: 256Mi
securityContext:
capabilities: {}
privileged: false
terminationMessagePath: /dev/termination-log
volumeMounts:
- mountPath: /var/lib/pgsql/data
name: postgresql-pact-broker-data
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: postgresql-pact-broker-data
emptyDir: {}
# persistentVolumeClaim:
# claimName: postgresql-pact-broker-data
test: false
triggers:
- imageChangeParams:
automatic: true
containerNames:
- postgresql
from:
kind: ImageStreamTag
name: postgresql:9.5
namespace: openshift
type: ImageChange
- type: ConfigChange
# SECRETS
- apiVersion: v1
metadata:
name: postgresql-pact-broker-secret
labels:
app: pact-broker
stringData:
password: ${POSTGRESQL_PASSWORD}
kind: Secret
# PARAMETERS
parameters:
- description: Password for the PostgreSQL connection user.
displayName: PostgreSQL Connection Password
from: '[a-zA-Z0-9]{16}'
generate: expression
name: POSTGRESQL_PASSWORD
required: true