-
Notifications
You must be signed in to change notification settings - Fork 109
/
03-instrumented-app.yml
92 lines (92 loc) · 2.25 KB
/
03-instrumented-app.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
apiVersion: v1
kind: ConfigMap
metadata:
name: beyla-config
data:
beyla-config.yml: |
routes:
unmatched: heuristic
---
apiVersion: v1
kind: ConfigMap
metadata:
name: system-config
data:
lockdown: none [integrity] confidentiality
---
# Feel free to replace the demo app by something different,
# but it needs to bring the autoinstrumenter as a sidecar container
apiVersion: apps/v1
kind: Deployment
metadata:
name: goblog
labels:
app: goblog
spec:
replicas: 1
selector:
matchLabels:
app: goblog
template:
metadata:
labels:
app: goblog
spec:
# required so the sidecar instrumenter can access the service process
shareProcessNamespace: true
volumes:
- name: beyla-config
configMap:
name: beyla-config
- name: system-config
configMap:
name: system-config
containers:
- name: goblog
image: mariomac/goblog:dev
imagePullPolicy: IfNotPresent
command: [ "/goblog" ]
env:
- name: "GOBLOG_CONFIG"
value: "/sample/config.yml"
ports:
- containerPort: 8443
name: https
- name: autoinstrumenter
image: grafana/beyla:main
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- mountPath: /config
name: beyla-config
- mountPath: /sys/kernel/security
name: system-config
env:
- name: BEYLA_CONFIG_PATH
value: "/config/beyla-config.yml"
- name: BEYLA_SERVICE_NAME
value: "goblog"
- name: BEYLA_TRACE_PRINTER
value: "text"
- name: BEYLA_OPEN_PORT
value: "8443"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://grafana-agent:4318"
- name: BEYLA_LOG_LEVEL
value: "DEBUG"
- name: OTEL_RESOURCE_ATTRIBUTES
value: "deployment.environment=production"
---
apiVersion: v1
kind: Service
metadata:
name: goblog
spec:
selector:
app: goblog
ports:
- port: 8443
protocol: TCP
targetPort: https