diff --git a/Cargo.lock b/Cargo.lock index 2a614bec..6c410fee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -521,9 +521,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ "crossbeam-utils", ] @@ -2987,9 +2987,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.43.0" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", diff --git a/deploy/helm/listener-operator/templates/_telemetry.tpl b/deploy/helm/listener-operator/templates/_telemetry.tpl new file mode 100644 index 00000000..ec49f788 --- /dev/null +++ b/deploy/helm/listener-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/listener-operator/templates/controller-deployment.yaml b/deploy/helm/listener-operator/templates/controller-deployment.yaml index 47ec3b80..5d0e6206 100644 --- a/deploy/helm/listener-operator/templates/controller-deployment.yaml +++ b/deploy/helm/listener-operator/templates/controller-deployment.yaml @@ -46,6 +46,7 @@ spec: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ .Values.kubernetesClusterDomain | quote }} {{- end }} + {{- include "telemetry.envVars" . | nindent 12 }} volumeMounts: - name: csi mountPath: /csi diff --git a/deploy/helm/listener-operator/templates/node-daemonset.yaml b/deploy/helm/listener-operator/templates/node-daemonset.yaml index 545647c6..9f69b7fa 100644 --- a/deploy/helm/listener-operator/templates/node-daemonset.yaml +++ b/deploy/helm/listener-operator/templates/node-daemonset.yaml @@ -50,6 +50,7 @@ spec: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ .Values.kubernetesClusterDomain | quote }} {{- end }} + {{- include "telemetry.envVars" . | nindent 12 }} volumeMounts: - name: csi mountPath: /csi diff --git a/deploy/helm/listener-operator/values.yaml b/deploy/helm/listener-operator/values.yaml index fcd258d2..5e80f4ce 100644 --- a/deploy/helm/listener-operator/values.yaml +++ b/deploy/helm/listener-operator/values.yaml @@ -104,3 +104,17 @@ kubeletDir: /var/lib/kubelet # stable-nodes: ListenerClasses are preinstalled that are suitable for on-prem/"pet" environments, assuming long-running Nodes but not requiring a LoadBalancer controller # 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 preset: stable-nodes + +# 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: false + rotationPeriod: hourly + maxFiles: 6 + otelLogExporter: + enabled: false + otelTraceExporter: + enabled: false 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