Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/docker-otel-lgtm
Path: blob/main/examples/java/json-logging-logback/k8s/lgtm.yaml
401 views
1
apiVersion: v1
2
kind: Service
3
metadata:
4
name: lgtm
5
spec:
6
selector:
7
app: lgtm
8
ports:
9
- name: grafana
10
protocol: TCP
11
port: 3000
12
targetPort: 3000
13
- name: otel-grpc
14
protocol: TCP
15
port: 4317
16
targetPort: 4317
17
- name: otel-http
18
protocol: TCP
19
port: 4318
20
targetPort: 4318
21
- name: prometheus # needed for automated tests
22
protocol: TCP
23
port: 9090
24
targetPort: 9090
25
- name: loki # needed for automated tests
26
protocol: TCP
27
port: 3100
28
targetPort: 3100
29
- name: tempo # needed for automated tests
30
protocol: TCP
31
port: 3200
32
targetPort: 3200
33
---
34
apiVersion: apps/v1
35
kind: Deployment
36
metadata:
37
name: lgtm
38
spec:
39
replicas: 1
40
selector:
41
matchLabels:
42
app: lgtm
43
template:
44
metadata:
45
labels:
46
app: lgtm
47
spec:
48
containers:
49
- name: lgtm
50
image: grafana/otel-lgtm:latest
51
ports:
52
- containerPort: 3000
53
- containerPort: 4317
54
- containerPort: 4318
55
- containerPort: 9090 # needed for automated tests
56
- containerPort: 3100 # needed for automated tests
57
- containerPort: 3200 # needed for automated tests
58
readinessProbe:
59
exec:
60
command:
61
- cat
62
- /tmp/ready
63
volumeMounts:
64
- mountPath: /otel-lgtm/otelcol-config.yaml
65
name: otel-collector-config
66
subPath: otel-collector-config.yaml
67
readOnly: true
68
- mountPath: /var/log
69
name: varlog
70
readOnly: true
71
- mountPath: /var/lib/docker/containers
72
name: varlibdockercontainers
73
readOnly: true
74
env:
75
- name: ENABLE_LOGS_OTELCOL
76
value: "true"
77
volumes:
78
- name: otel-collector-config
79
configMap:
80
name: otel-collector-config
81
- name: varlog
82
hostPath:
83
path: /var/log
84
- name: varlibdockercontainers
85
hostPath:
86
path: /var/lib/docker/containers
87
88