Skip to content

Commit eedeff3

Browse files
chore: Add telemetry support for Helm (#588)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@1ba8fc4 Reference-to: stackabletech/operator-templating@1ba8fc4 (Telemetry support for Helm) * fix: Bump crossbeam-channel to 0.5.15 This fixes RUSTSEC-2025-0024. * fix: Bump openssl to 0.10.72 This fixes RUSTSEC-2025-0022. * fix: Bump tokio to 1.44.2 This fixes RUSTSEC-2025-0023 * chore(helm): Add default telemetry values * chore(helm): Disable fileLog by default, set maxFiles to 6 * chore(helm): Add telemetry env vars to DaemonSet --------- Co-authored-by: Techassi <[email protected]>
1 parent cab0ff2 commit eedeff3

File tree

5 files changed

+83
-9
lines changed

5 files changed

+83
-9
lines changed

Cargo.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{{/*
2+
Create a list of telemetry related env vars.
3+
*/}}
4+
{{- define "telemetry.envVars" -}}
5+
{{- with .Values.telemetry }}
6+
{{- if not .consoleLog.enabled }}
7+
- name: CONSOLE_LOG_DISABLED
8+
value: "true"
9+
{{- end }}
10+
{{- if .consoleLog.level }}
11+
- name: CONSOLE_LOG_LEVEL
12+
value: {{ .consoleLog.level }}
13+
{{ end }}
14+
{{- if .consoleLog.format }}
15+
- name: CONSOLE_LOG_FORMAT
16+
value: {{ .consoleLog.format }}
17+
{{ end }}
18+
{{- if .fileLog.enabled }}
19+
- name: FILE_LOG_DIRECTORY
20+
value: /stackable/logs/{{ include "operator.appname" $ }}
21+
{{- end }}
22+
{{- if .fileLog.level }}
23+
- name: FILE_LOG_LEVEL
24+
value: {{ .fileLog.level }}
25+
{{- end }}
26+
{{- if .fileLog.rotationPeriod }}
27+
- name: FILE_LOG_ROTATION_PERIOD
28+
value: {{ .fileLog.rotationPeriod }}
29+
{{- end }}
30+
{{- if .fileLog.maxFiles }}
31+
- name: FILE_LOG_MAX_FILES
32+
value: {{ .fileLog.maxFiles }}
33+
{{- end }}
34+
{{- if .otelLogExporter.enabled }}
35+
- name: OTEL_LOG_EXPORTER_ENABLED
36+
value: "true"
37+
{{- end }}
38+
{{- if .otelLogExporter.level }}
39+
- name: OTEL_LOG_EXPORTER_LEVEL
40+
value: {{ .otelLogExporter.level }}
41+
{{- end }}
42+
{{- if .otelLogExporter.endpoint }}
43+
- name: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
44+
value: {{ .otelLogExporter.endpoint }}
45+
{{- end }}
46+
{{- if .otelTraceExporter.enabled }}
47+
- name: OTEL_TRACE_EXPORTER_ENABLED
48+
value: "true"
49+
{{- end }}
50+
{{- if .otelTraceExporter.level }}
51+
- name: OTEL_TRACE_EXPORTER_LEVEL
52+
value: {{ .otelTraceExporter.level }}
53+
{{- end }}
54+
{{- if .otelTraceExporter.endpoint }}
55+
- name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
56+
value: {{ .otelTraceExporter.endpoint }}
57+
{{- end }}
58+
{{- end }}
59+
{{- end }}

deploy/helm/secret-operator/templates/daemonset.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ spec:
4747
- name: KUBERNETES_CLUSTER_DOMAIN
4848
value: {{ .Values.kubernetesClusterDomain | quote }}
4949
{{- end }}
50+
{{- include "telemetry.envVars" . | nindent 12 }}
5051
volumeMounts:
5152
- name: csi
5253
mountPath: /csi

deploy/helm/secret-operator/values.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,17 @@ secretClasses:
9494
# The namespace that the TLS Certificate Authority is installed into.
9595
# Defaults to the namespace where secret-op is installed.
9696
caSecretNamespace: null
97+
98+
# See all available options and detailed explanations about the concept here:
99+
# https://docs.stackable.tech/home/stable/concepts/telemetry/
100+
telemetry:
101+
consoleLog:
102+
enabled: true
103+
fileLog:
104+
enabled: false
105+
rotationPeriod: hourly
106+
maxFiles: 6
107+
otelLogExporter:
108+
enabled: false
109+
otelTraceExporter:
110+
enabled: false

nix/README.md

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)