-
Notifications
You must be signed in to change notification settings - Fork 10
/
daemonset.yaml
57 lines (57 loc) · 1.73 KB
/
daemonset.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
56
57
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
{{- if .Values.additionalAnnotations }}
annotations:
{{ toYaml .Values.additionalAnnotations | indent 4 }}
{{- end }}
labels:
{{- include "beyla.labels" . | indent 4 }}
app.kubernetes.io/component: workload
name: {{ template "beyla.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
{{- include "beyla.selectorLabels" . | indent 6 }}
app.kubernetes.io/component: workload
template:
metadata:
labels:
{{- include "beyla.labels" . | indent 8 }}
app.kubernetes.io/component: workload
spec:
serviceAccountName: {{ template "beyla.serviceAccountName" . }}
hostPID: true # mandatory!
{{- if .Values.image.pullSecrets }}
imagePullSecrets: {{- .Values.image.pullSecrets }}
{{- toYaml .Values.beyla.image.pullSecrets | nindent 8 }}
{{- end }}
containers:
- name: beyla
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
env:
- name: BEYLA_CONFIG_PATH
value: "/config/beyla-config.yml"
ports:
- name: metrics
containerPort: {{ .Values.beyla.config.prometheus_export.port }}
{{- with .Values.beyla.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
securityContext:
runAsUser: 0
privileged: true # mandatory!
volumeMounts:
- mountPath: /config
name: beyla-config
volumes:
- name: beyla-config
configMap:
{{- if not .Values.beyla.existingConfig }}
name: beyla-config
{{- else }}
name: {{ .Values.beyla.existingConfig }}
{{- end }}