Skip to content

Commit 1e58457

Browse files
chore: Add telemetry support for Helm (#296)
* 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 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 Deployment and DaemonSet --------- Co-authored-by: Techassi <[email protected]>
1 parent 2a7ae72 commit 1e58457

File tree

6 files changed

+80
-5
lines changed

6 files changed

+80
-5
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 59 additions & 0 deletions
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/listener-operator/templates/controller-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ spec:
4646
- name: KUBERNETES_CLUSTER_DOMAIN
4747
value: {{ .Values.kubernetesClusterDomain | quote }}
4848
{{- end }}
49+
{{- include "telemetry.envVars" . | nindent 12 }}
4950
volumeMounts:
5051
- name: csi
5152
mountPath: /csi

deploy/helm/listener-operator/templates/node-daemonset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ spec:
5050
- name: KUBERNETES_CLUSTER_DOMAIN
5151
value: {{ .Values.kubernetesClusterDomain | quote }}
5252
{{- end }}
53+
{{- include "telemetry.envVars" . | nindent 12 }}
5354
volumeMounts:
5455
- name: csi
5556
mountPath: /csi

deploy/helm/listener-operator/values.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,17 @@ kubeletDir: /var/lib/kubelet
104104
# stable-nodes: ListenerClasses are preinstalled that are suitable for on-prem/"pet" environments, assuming long-running Nodes but not requiring a LoadBalancer controller
105105
# ephemeral-nodes: ListenerClasses are preinstalled that are suitable for cloud/"cattle" environments with short-lived nodes, however this requires a LoadBalancer controller to be installed
106106
preset: stable-nodes
107+
108+
# See all available options and detailed explanations about the concept here:
109+
# https://docs.stackable.tech/home/stable/concepts/telemetry/
110+
telemetry:
111+
consoleLog:
112+
enabled: true
113+
fileLog:
114+
enabled: false
115+
rotationPeriod: hourly
116+
maxFiles: 6
117+
otelLogExporter:
118+
enabled: false
119+
otelTraceExporter:
120+
enabled: false

nix/README.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)