-
Notifications
You must be signed in to change notification settings - Fork 0
/
documentation.yaml
254 lines (254 loc) · 6.95 KB
/
documentation.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
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
kind: Template
apiVersion: v1
metadata:
name: docpod
labels:
template: docpod
annotations:
description: >-
An asciidoctor documentation pod.
iconClass: icon-nginx
openshift.io/display-name: AsciiDoctor docpod
openshift.io/documentation-url: 'https://github.com/klenkes74/openshift-asciidoctor'
openshift.io/long-description: >-
This image is an S2I builder running on top of the centos nginx image.
openshift.io/provider-display-name: 'Kaiserpfalz EDV-Service, Roland T. Lichti'
openshift.io/support-url: 'https://www.kaiserpfalz-edv.de'
tags: 'nginx,builder,cms'
template.openshift.io/bindable: 'false'
parameters:
- name: APPLICATION_NAME
displayName: Application Name
description: The name of the application the docu is generated for.
required: true
value: docpod
- name: APPLICATION_URL
displayName: URL for the documentation
description: The URL for publishing the documentation
required: false
- name: ASCIIDOCTOR_VERSION
displayName: Version (ASCIIDOCTOR)
description: The version of asciidoctor used.
required: true
value: '2.0.9'
- name: ASCIIDOCTOR_TAG
displayName: Version Tag (ASCIIDOCTOR)
description: The tag of the asciidoc builder
required: true
value: 'latest'
- name: ASCIIDOCTOR_ARGS
displayName: Runtime arguments for ASCIIDOCTOR
description: "Additional parameters for the ASCIIDOCTOR run. Defaulting to: '-n -t -v'"
required: true
value: '-n -t -v'
- name: GITHUB_SECRET
displayName: GitHub WebHook Secret
description: The BASE64 encoded GitHub WebHook Secret
required: true
value: dGExdmFpZjhob3AwbmVpOEhlZTU=
objects:
- kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
annotations:
description: The documentation of
template.alpha.openshift.io/wait-for-ready: 'true'
labels:
template: docpod
delete: ${APPLICATION_NAME}-docpod
name: ${APPLICATION_NAME}-docpod
spec:
completionDeadlineSeconds: 600
successfulBuildsHistoryLimit: 1
failedBuildsHistoryLimit: 1
output:
imageLabels:
- name: io.k8s.display-name
value: ASCIIdoc docpod
- name: io.k8s.description
value: >-
The docpod containing the documentation for project ${APPLICATION_NAME}
- name: io.openshift.s2i.scripts-url
value: 'image:///usr/libexec/s2i'
- name: io.s2i.scripts-url
value: 'image:///usr/libexec/s2i'
- name: io.openshift.tags
value: 'builder,asciidoc,nginx'
- name: template
value: docpod
- name: io.openshift.expose-services
value: '8080:http'
to:
kind: ImageStreamTag
name: "${APPLICATION_NAME}-docpod:latest"
resources:
limits:
cpu: 2000m
memory: 2Gi
requests:
cpu: 500m
memory: 512Mi
runPolicy: Serial
source:
contextDir: documentation
git:
ref: master
uri: 'https://github.com/klenkes74/openshift-asciidoctor.git'
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: "asciidoctor-s2i-${ASCIIDOCTOR_VERSION}:${ASCIIDOCTOR_TAG}"
namespace: dev-images
env:
- name: ASCIIDOCTOR_ARGS
value: "${ASCIIDOCTOR_ARGS}"
type: Source
triggers:
- imageChange:
type: ImageChange
- type: ConfigChange
- github:
secretReference:
name: ${APPLICATION_NAME}-docpod
type: GitHub
- kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
labels:
template: docpod
delete: ${APPLICATION_NAME}-docpod
name: ${APPLICATION_NAME}-docpod
spec:
lookupPolicy:
local: true
- kind: Secret
apiVersion: v1
metadata:
name: ${APPLICATION_NAME}-docpod
labels:
template: docpod
delete: ${APPLICATION_NAME}-docpod
type: Opaque
data:
WebHookSecretKey: ${GITHUB_SECRET}
- kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
metadata:
name: ${APPLICATION_NAME}-docpod
labels:
template: docpod
app: ${APPLICATION_NAME}
delete: ${APPLICATION_NAME}-docpod
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
app: "${APPLICATION_NAME}"
deploymentConfig: "${APPLICATION_NAME}-docpod"
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- docpod
from:
kind: ImageStreamTag
name: "${APPLICATION_NAME}-docpod:latest"
template:
metadata:
labels:
app: "${APPLICATION_NAME}"
deploymentConfig: "${APPLICATION_NAME}-docpod"
spec:
containers:
- name: "docpod"
image: "${APPLICATION_NAME}-docpod:latest"
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 256Mi
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
readinessProbe:
httpGet:
scheme: 'HTTP'
port: 8080
path: '/index.html'
httpHeaders:
- name: 'X-Forwarded-Proto'
value: 'https'
- name: 'X-Probe-Type'
value: 'readiness'
failureThreshold: 3
successThreshold: 1
initialDelayTimeout: 5
timeoutSeconds: 1
periodSeconds: 5
livenessProbe:
httpGet:
scheme: 'HTTP'
port: 8080
path: '/index.html'
httpHeaders:
- name: 'X-Forwarded-Proto'
value: 'https'
- name: 'X-Probe-Type'
value: 'liveness'
failureThreshold: 3
successThreshold: 1
initialDelayTimeout: 5
timeoutSeconds: 1
periodSeconds: 5
- kind: Service
apiVersion: v1
metadata:
name: "${APPLICATION_NAME}-docpod"
labels:
app: "${APPLICATION_NAME}"
delete: ${APPLICATION_NAME}-docpod
spec:
ports:
- name: '8080-tcp'
protocol: 'TCP'
port: 8080
targetPort: 8080
- name: '8443-tcp'
protocol: 'TCP'
port: 8443
targetPort: 8443
selector:
app: "${APPLICATION_NAME}"
deploymentconfig: "${APPLICATION_NAME}-docpod"
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 3600
- kind: Route
apiVersion: v1
metadata:
name: "${APPLICATION_NAME}-docpod"
labels:
app: "${APPLICATION_NAME}"
delete: ${APPLICATION_NAME}-docpod
annotations:
console.alpha.openshift.io/overview-app-route: 'true'
spec:
host: "${APPLICATION_URL}"
to:
kind: Service
name: "${APPLICATION_NAME}-docpod"
weight: 100
port:
targetPort: 8080-tcp
tls:
termination: 'edge'
insecureEdgeTerminationPolicy: 'Redirect'