Skip to content

Commit 9db1694

Browse files
Add Helm support for export.mode with sidecar management
Update Helm chart to support export.mode (stdout, file and direct-stdout), with conditional sidecar and volume management. Default to stdout mode for backward compatibility. Enhancement #1710 Signed-off-by: Amir Reza Nazarizadeh <[email protected]>
1 parent a7727bd commit 9db1694

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

install/kubernetes/tetragon/README.md

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/kubernetes/tetragon/templates/_container_tetragon.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@
3434
name: bpf-maps
3535
- mountPath: "/var/run/cilium"
3636
name: cilium-run
37+
{{- if or (eq .Values.export.mode "file") (eq .Values.export.mode "stdout") }}
3738
- mountPath: {{ .Values.exportDirectory }}
3839
name: export-logs
40+
{{- end }}
3941
- mountPath: "/procRoot"
4042
name: host-proc
4143
{{- if and (.Values.tetragon.cri.enabled) (.Values.tetragon.cri.socketHostPath) }}

install/kubernetes/tetragon/templates/daemonset.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ spec:
5656
{{- end }}
5757
{{- include "initcontainers.extra" . | nindent 6 }}
5858
containers:
59-
{{- if eq .Values.export.mode "stdout" }}
59+
{{- if or (eq .Values.export.mode "file") (eq .Values.export.mode "stdout") }}
6060
{{- include "container.export.stdout" . | nindent 6 -}}
6161
{{- end }}
6262
{{- if .Values.tetragon.enabled }}
@@ -82,10 +82,12 @@ spec:
8282
hostPath:
8383
path: /var/run/cilium
8484
type: DirectoryOrCreate
85+
{{- if or (eq .Values.export.mode "file") (eq .Values.export.mode "stdout") }}
8586
- name: export-logs
8687
hostPath:
8788
path: {{ .Values.exportDirectory }}
8889
type: DirectoryOrCreate
90+
{{- end }}
8991
{{- if .Values.tetragon.enabled }}
9092
- name: tetragon-config
9193
configMap:

install/kubernetes/tetragon/templates/tetragon_configmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ data:
8787
{{- end }}
8888
enable-cgidmap: {{ .Values.tetragon.cgidmap.enabled | quote }}
8989
enable-pod-annotations: {{ .Values.tetragon.podAnnotations.enabled | default "false" | quote }}
90+
export-mode: {{ .Values.export.mode | default "stdout" | quote }}

install/kubernetes/tetragon/values.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ enabled: true
33
imagePullSecrets: []
44
# Tetragon agent settings
55
priorityClassName: ""
6-
imagePullPolicy: IfNotPresent
6+
imagePullPolicy: Always
77
serviceAccount:
88
create: true
99
annotations: {}
@@ -39,8 +39,8 @@ tetragon:
3939
enabled: true
4040
image:
4141
override: ~
42-
repository: quay.io/cilium/tetragon
43-
tag: v1.4.0
42+
repository: 172.16.236.129:5000/cilium/tetragon
43+
tag: 16
4444
resources: {}
4545
extraArgs: {}
4646
extraEnv: []
@@ -319,9 +319,9 @@ tetragonOperator:
319319
# -- tetragon-operator image.
320320
image:
321321
override: ~
322-
repository: quay.io/cilium/tetragon-operator
323-
tag: v1.4.0
324-
pullPolicy: IfNotPresent
322+
repository: 172.16.236.129:5000/cilium/tetragon-operator
323+
tag: 16
324+
pullPolicy: Always
325325
# -- Extra volumes for the Tetragon Operator Deployment.
326326
extraVolumes: []
327327
extraVolumeMounts: []
@@ -351,7 +351,7 @@ tetragonOperator:
351351
scrapeInterval: "10s"
352352
# -- Tetragon events export settings
353353
export:
354-
# "stdout". "" to disable.
354+
# "stdout (deprecated)" - file (sidecar + volume) - direct-stdout (stdout without file and sidecar).
355355
mode: "stdout"
356356
resources: {}
357357
securityContext: {}

0 commit comments

Comments
 (0)