forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.go
71 lines (70 loc) · 1.91 KB
/
deployment.go
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
package v310_00
const DeploymentYaml = `apiVersion: apps/v1
kind: Deployment
metadata:
namespace: openshift-web-console
name: webconsole
labels:
app: openshift-web-console
webconsole: "true"
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: openshift-web-console
webconsole: "true"
template:
metadata:
name: webconsole
labels:
app: openshift-web-console
webconsole: "true"
spec:
serviceAccountName: webconsole
containers:
- name: webconsole
image: ${IMAGE}
imagePullPolicy: IfNotPresent
command:
- "/usr/bin/origin-web-console"
- "--audit-log-path=-"
- "--config=/var/webconsole-config/webconsole-config.yaml"
ports:
- containerPort: 8443
volumeMounts:
- mountPath: /var/serving-cert
name: serving-cert
- mountPath: /var/webconsole-config
name: webconsole-config
readinessProbe:
httpGet:
path: /healthz
port: 8443
scheme: HTTPS
livenessProbe:
exec:
command:
- /bin/sh
- -i
- -c
- |-
if [[ ! -f /tmp/webconsole-config.hash ]]; then \
md5sum /var/webconsole-config/webconsole-config.yaml > /tmp/webconsole-config.hash; \
elif [[ $(md5sum /var/webconsole-config/webconsole-config.yaml) != $(cat /tmp/webconsole-config.hash) ]]; then \
exit 1; \
fi && curl -k -f https://0.0.0.0:8443/console/
resources:
requests:
cpu: 100m
memory: 100Mi
volumes:
- name: serving-cert
secret:
defaultMode: 400
secretName: webconsole-serving-cert
- name: webconsole-config
configMap:
defaultMode: 440
name: webconsole-config
`