From 2cadb3c6294574801f71f5e9435e37e646013195 Mon Sep 17 00:00:00 2001 From: Stacky McStackface Date: Tue, 15 Apr 2025 09:45:32 +0000 Subject: [PATCH 1/3] chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@1ba8fc47936906417722c9f3e2adeb5f77f3845d Reference-to: stackabletech/operator-templating@1ba8fc4 (Telemetry support for Helm) --- .../hive-operator/templates/_telemetry.tpl | 59 +++++++++++++++++++ .../hive-operator/templates/deployment.yaml | 1 + nix/README.md | 2 +- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 deploy/helm/hive-operator/templates/_telemetry.tpl diff --git a/deploy/helm/hive-operator/templates/_telemetry.tpl b/deploy/helm/hive-operator/templates/_telemetry.tpl new file mode 100644 index 00000000..ec49f788 --- /dev/null +++ b/deploy/helm/hive-operator/templates/_telemetry.tpl @@ -0,0 +1,59 @@ +{{/* +Create a list of telemetry related env vars. +*/}} +{{- define "telemetry.envVars" -}} +{{- with .Values.telemetry }} +{{- if not .consoleLog.enabled }} +- name: CONSOLE_LOG_DISABLED + value: "true" +{{- end }} +{{- if .consoleLog.level }} +- name: CONSOLE_LOG_LEVEL + value: {{ .consoleLog.level }} +{{ end }} +{{- if .consoleLog.format }} +- name: CONSOLE_LOG_FORMAT + value: {{ .consoleLog.format }} +{{ end }} +{{- if .fileLog.enabled }} +- name: FILE_LOG_DIRECTORY + value: /stackable/logs/{{ include "operator.appname" $ }} +{{- end }} +{{- if .fileLog.level }} +- name: FILE_LOG_LEVEL + value: {{ .fileLog.level }} +{{- end }} +{{- if .fileLog.rotationPeriod }} +- name: FILE_LOG_ROTATION_PERIOD + value: {{ .fileLog.rotationPeriod }} +{{- end }} +{{- if .fileLog.maxFiles }} +- name: FILE_LOG_MAX_FILES + value: {{ .fileLog.maxFiles }} +{{- end }} +{{- if .otelLogExporter.enabled }} +- name: OTEL_LOG_EXPORTER_ENABLED + value: "true" +{{- end }} +{{- if .otelLogExporter.level }} +- name: OTEL_LOG_EXPORTER_LEVEL + value: {{ .otelLogExporter.level }} +{{- end }} +{{- if .otelLogExporter.endpoint }} +- name: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT + value: {{ .otelLogExporter.endpoint }} +{{- end }} +{{- if .otelTraceExporter.enabled }} +- name: OTEL_TRACE_EXPORTER_ENABLED + value: "true" +{{- end }} +{{- if .otelTraceExporter.level }} +- name: OTEL_TRACE_EXPORTER_LEVEL + value: {{ .otelTraceExporter.level }} +{{- end }} +{{- if .otelTraceExporter.endpoint }} +- name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: {{ .otelTraceExporter.endpoint }} +{{- end }} +{{- end }} +{{- end }} diff --git a/deploy/helm/hive-operator/templates/deployment.yaml b/deploy/helm/hive-operator/templates/deployment.yaml index 9562e490..2429e0c3 100644 --- a/deploy/helm/hive-operator/templates/deployment.yaml +++ b/deploy/helm/hive-operator/templates/deployment.yaml @@ -51,6 +51,7 @@ spec: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ .Values.kubernetesClusterDomain | quote }} {{- end }} + {{- include "telemetry.envVars" . | nindent 12 }} volumes: - name: config-spec configMap: diff --git a/nix/README.md b/nix/README.md index d3245031..a74e2402 100644 --- a/nix/README.md +++ b/nix/README.md @@ -13,7 +13,7 @@ DO NOT MANUALLY EDIT THIS FILE ```shell niv update crate2nix niv update nixpkgs -niv update beky.py -b X.Y.Z # Using the release tag +niv update beku.py -b X.Y.Z # Using the release tag ``` ### Test From ca739e7cbce65192b198e6c5a8a45b7416787438 Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 15 Apr 2025 14:21:46 +0200 Subject: [PATCH 2/3] chore(helm): Add default telemetry values --- deploy/helm/hive-operator/values.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deploy/helm/hive-operator/values.yaml b/deploy/helm/hive-operator/values.yaml index 669114e6..0bdec7ae 100644 --- a/deploy/helm/hive-operator/values.yaml +++ b/deploy/helm/hive-operator/values.yaml @@ -51,3 +51,16 @@ affinity: {} # When running on a non-default Kubernetes cluster domain, the cluster domain can be configured here. # See the https://docs.stackable.tech/home/stable/guides/kubernetes-cluster-domain guide for details. # kubernetesClusterDomain: my-cluster.local + +# See all available options and detailed explanations about the concept here: +# https://docs.stackable.tech/home/stable/concepts/telemetry/ +telemetry: + consoleLog: + enabled: true + fileLog: + enabled: true + rotationPeriod: hourly + otelLogExporter: + enabled: false + otelTraceExporter: + enabled: false From a14113821ad3e4320c672e25059b9b7eee5f7b70 Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 15 Apr 2025 14:59:16 +0200 Subject: [PATCH 3/3] chore(helm): Disable fileLog by default, set maxFiles to 6 --- deploy/helm/hive-operator/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/helm/hive-operator/values.yaml b/deploy/helm/hive-operator/values.yaml index 0bdec7ae..f441f93b 100644 --- a/deploy/helm/hive-operator/values.yaml +++ b/deploy/helm/hive-operator/values.yaml @@ -58,8 +58,9 @@ telemetry: consoleLog: enabled: true fileLog: - enabled: true + enabled: false rotationPeriod: hourly + maxFiles: 6 otelLogExporter: enabled: false otelTraceExporter: