-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapplication_sidecar.yaml
43 lines (43 loc) · 1.19 KB
/
application_sidecar.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-java-app-deployment
labels:
app: my-java-app
spec:
replicas: 1
selector:
matchLabels:
app: my-java-app
template:
metadata:
labels:
app: my-java-app
spec:
containers:
- name: my-java-app
image: whatap/kube-apm-helper:0.1.0
command: ["sleep", "1000000"]
ports:
- containerPort: 8080
env:
- name: WTP_CON_NAME
value: "my-java-app"
- name: NODE_IP
valueFrom: { fieldRef: { fieldPath: status.hostIP } }
- name: NODE_NAME
valueFrom: { fieldRef: { fieldPath: spec.nodeName } }
- name: POD_NAME
valueFrom: { fieldRef: { fieldPath: metadata.name } }
- name: POD_ID
valueFrom: { fieldRef: { fieldPath: metadata.uid } }
volumeMounts:
- name: pod-path
mountPath: /var/lib/kubelet/pods
volumes:
- name: pod-path
hostPath:
path: /var/lib/kubelet/pods
- name: containerddomainsocket
hostPath:
path: /run/containerd/container.sock