forked from hawtio/hawtio-online
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment-cluster-os4.yml
201 lines (201 loc) · 5.13 KB
/
deployment-cluster-os4.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
apiVersion: v1
kind: Template
metadata:
name: hawtio-online
parameters:
- name: ROUTE_HOSTNAME
description: The externally-reachable host name that routes to the Hawtio Online service
required: true
- name: OPENSHIFT_WEB_CONSOLE_URL
description: The externally-reachable URL that routes to the OpenShift Web console
required: false
message: |-
Hawtio Online is deployed to ${ROUTE_HOSTNAME}.
objects:
- apiVersion: v1
kind: ConfigMap
metadata:
name: hawtio-online
data:
hawtconfig.json: |
{
"about": {
"title": "Hawtio OpenShift Console",
"productInfo": [],
"additionalInfo": "The Hawtio OpenShift Console eases the discovery and management of 'hawtio-enabled' applications deployed on OpenShift.",
"copyright": ""
},
"branding": {
"appName": "Hawtio OpenShift Console",
"appLogoUrl": "img/hawtio-logo.svg"
},
"disabledRoutes": []
}
- apiVersion: v1
kind: ConfigMap
metadata:
name: hawtio-integration
data:
hawtconfig.json: |
{
"branding": {
"appName": "Hawtio Integration Console",
"appLogoUrl": "img/hawtio-logo.svg",
"aboutDescription": "The Hawtio Integration Console enables introspecting Java applications."
},
"disabledRoutes": []
}
- apiVersion: v1
kind: ImageStream
metadata:
name: hawtio-online
labels:
app: hawtio
component: online
spec:
tags:
- from:
kind: DockerImage
name: docker.io/hawtio/online:latest
importPolicy:
scheduled: true
name: latest
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: hawtio
component: online
name: hawtio-online
spec:
replicas: 1
selector:
app: hawtio
component: online
deploymentconfig: hawtio-online
strategy:
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
app: hawtio
component: online
deploymentconfig: hawtio-online
spec:
containers:
- image: hawtio/online
imagePullPolicy: Always
name: hawtio-online
ports:
- name: nginx
containerPort: 8443
livenessProbe:
httpGet:
path: /online
port: nginx
scheme: HTTPS
periodSeconds: 10
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /online
port: nginx
scheme: HTTPS
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
env:
- name: HAWTIO_ONLINE_MODE
value: cluster
- name: HAWTIO_ONLINE_GATEWAY
value: 'true'
- name: OPENSHIFT_WEB_CONSOLE_URL
value: ${OPENSHIFT_WEB_CONSOLE_URL}
- name: OPENSHIFT_CLUSTER_VERSION
value: '4'
resources:
requests:
cpu: 0.2
memory: 32Mi
limits:
cpu: 1.0
memory: 32Mi
volumeMounts:
- name: hawtio-online
mountPath: /usr/share/nginx/html/online/hawtconfig.json
subPath: hawtconfig.json
- name: hawtio-integration
mountPath: /usr/share/nginx/html/integration/hawtconfig.json
subPath: hawtconfig.json
- mountPath: /etc/tls/private/serving
name: hawtio-online-tls-serving
- mountPath: /etc/tls/private/proxying
name: hawtio-online-tls-proxying
volumes:
- name: hawtio-online
configMap:
name: hawtio-online
- name: hawtio-integration
configMap:
name: hawtio-integration
- name: hawtio-online-tls-serving
secret:
secretName: hawtio-online-tls-serving
- name: hawtio-online-tls-proxying
secret:
secretName: hawtio-online-tls-proxying
triggers:
- imageChangeParams:
automatic: true
containerNames:
- hawtio-online
from:
kind: ImageStreamTag
name: hawtio-online:latest
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
labels:
app: hawtio
component: online
annotations:
service.beta.openshift.io/serving-cert-secret-name: hawtio-online-tls-serving
name: hawtio-online
spec:
ports:
- port: 443
protocol: TCP
targetPort: nginx
selector:
app: hawtio
component: online
- apiVersion: v1
kind: Route
metadata:
labels:
app: hawtio
component: online
name: hawtio-online
spec:
host: ${ROUTE_HOSTNAME}
to:
kind: Service
name: hawtio-online
tls:
insecureEdgeTerminationPolicy: Redirect
termination: reencrypt
- apiVersion: v1
kind: OAuthClient
metadata:
name: hawtio-online
grantMethod: auto
redirectURIs:
- https://${ROUTE_HOSTNAME}