This repository has been archived by the owner on Jul 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.openshift-template.yaml
212 lines (212 loc) · 5.62 KB
/
.openshift-template.yaml
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
apiVersion: v1
kind: Template
metadata:
name: bot-github-chatops-template
parameters:
- name: BOT_NAME
description: The Bot name
displayName: Bot Name
required: true
- name: SYMPHONY_API_HOST
description: The hostname serving the Symphony API endpoints
displayName: Symphony API hostname
required: true
- name: SYMPHONY_POD_HOST
description: The hostname serving the Symphony API endpoints
displayName: Symphony Pod hostname
required: true
# Must be within 30000-32767 range - read more on https://docs.openshift.com/container-platform/latest/dev_guide/expose_service/expose_internal_ip_nodeport.html
- name: JOLOKIA_NODE_PORT
description: The port used to expose the Jolokia service
displayName: The Jolokia external port
required: true
objects:
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: ${BOT_NAME}
name: s2i-java-binary
spec:
dockerImageRepository: "docker.io/maoo/s2i-java-binary"
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: ${BOT_NAME}
name: ${BOT_NAME}
spec: {}
status:
dockerImageRepository: ""
- apiVersion: v1
kind: BuildConfig
metadata:
name: ${BOT_NAME}
labels:
app: ${BOT_NAME}
spec:
output:
to:
kind: ImageStreamTag
name: ${BOT_NAME}:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
type: Binary
binary:
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
name: s2i-java-binary:latest
triggers: {}
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: ${BOT_NAME}
name: ${BOT_NAME}
spec:
replicas: 1
selector:
app: ${BOT_NAME}
deploymentconfig: ${BOT_NAME}
strategy:
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
app: ${BOT_NAME}
deploymentconfig: ${BOT_NAME}
spec:
containers:
- image: ${BOT_NAME}:latest
imagePullPolicy: Always
name: ${BOT_NAME}
ports:
- containerPort: 8778
name: jolokia
protocol: TCP
readinessProbe:
httpGet:
path: /jolokia/exec/org.symphonyoss.client:type=ClientCheckMBean/isUp
port: 8778
livenessProbe:
httpGet:
path: /jolokia/exec/org.symphonyoss.client:type=ClientCheckMBean/isUp
port: 8778
resources: {}
terminationMessagePath: /dev/termination-log
env:
- name: JOLOKIA_HOST
value: "*"
- name: RUN_COMMAND
value: "java -jar /opt/openshift/bot-github-chatops-standalone.jar"
- name: SESSIONAUTH_URL
value: https://${SYMPHONY_API_HOST}/sessionauth
- name: KEYAUTH_URL
value: https://${SYMPHONY_API_HOST}/keyauth
- name: POD_URL
value: https://${SYMPHONY_POD_HOST}/pod
- name: AGENT_URL
value: https://${SYMPHONY_POD_HOST}/agent
- name: DOWNLOAD_HOST
valueFrom:
secretKeyRef:
name: symphony.foundation
key: download.host
- name: DOWNLOAD_PATH
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: certs.download.path
- name: DOWNLOAD_ITEMS
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: certs.download.items
- name: TRUSTSTORE_FILE
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: truststore.file
- name: TRUSTSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: truststore.password
- name: BOT_USER_EMAIL
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: bot.user.email
- name: BOT_USER_CERT_FILE
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: bot.user.cert.file
- name: BOT_USER_CERT_PASSWORD
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: bot.user.cert.password
- name: ADMIN_EMAILS
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: admin.emails
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: github.token
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- ${BOT_NAME}
from:
kind: ImageStreamTag
name: ${BOT_NAME}:latest
type: ImageChange
status: {}
- apiVersion: v1
kind: Service
metadata:
labels:
app: ${BOT_NAME}
name: github-chatops-jolokia
spec:
type: NodePort
selector:
app: ${BOT_NAME}
ports:
- name: ${BOT_NAME}-jolokia-port
nodePort: ${JOLOKIA_NODE_PORT}
port: 8778
protocol: TCP
targetPort: 8778
- apiVersion: v1
kind: Route
metadata:
labels:
app: ${BOT_NAME}
name: ${BOT_NAME}-jolokia
spec:
to:
kind: Service
name: github-chatops-jolokia