-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy_tomcat.yaml
55 lines (55 loc) · 1.3 KB
/
deploy_tomcat.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
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: tomcat
name: tomcat
spec:
replicas: 1
selector:
matchLabels:
app: tomcat
template:
metadata:
annotations:
learn.guyongquan.live/prometheusjmxexporterport: "18080"
labels:
app: tomcat
spec:
containers:
- env:
- name: CATALINA_OPTS
value: -javaagent:/data/jmxexporter.jar=18080:/data/tomcat.yml
image: tomcat
name: tomcat
imagePullPolicy: Always
resources:
requests:
cpu: 200m
memory: 200Mi
ports:
- containerPort: 8080
livenessProbe:
tcpSocket:
port: 8080
volumeMounts:
- mountPath: /data/jmxexporter.jar
name: jmxjar
subPath: jmxexporter.jar
- mountPath: /data/tomcat.yml
name: jmxconfig
subPath: tomcat.yml
restartPolicy: Always
volumes:
- name: jmxjar
configMap:
name: jmxexporterfiles
items:
- key: jmxexporter.jar
path: jmxexporter.jar
- name: jmxconfig
configMap:
name: jmxexporterfiles
items:
- key: tomcat.yml
path: tomcat.yml