From 2de28156a92208f5d747df28a2abbac2e9af43f4 Mon Sep 17 00:00:00 2001 From: Matthias Bertschy Date: Tue, 11 Mar 2025 14:31:54 +0100 Subject: [PATCH] use a noop exporter for logs instead of disabling Signed-off-by: Matthias Bertschy --- .../assets/otel-collector-config.yaml | 9 ++++++++ .../__snapshot__/snapshot_test.yaml.snap | 22 +++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/charts/kubescape-operator/assets/otel-collector-config.yaml b/charts/kubescape-operator/assets/otel-collector-config.yaml index 53741428..b8a4f04d 100644 --- a/charts/kubescape-operator/assets/otel-collector-config.yaml +++ b/charts/kubescape-operator/assets/otel-collector-config.yaml @@ -30,6 +30,10 @@ processors: # exporters configure how to send processed data to one or more backends. exporters: + debug/noop: + verbosity: basic + sampling_initial: 0 + sampling_thereafter: 0 otlp/ksCloud: {{- if $configurations.ksOtel }} endpoint: ${env:CLOUD_OTEL_COLLECTOR_URL} @@ -81,3 +85,8 @@ service: {{- if $configurations.otel }} - otlp {{- end }} + logs: + receivers: [otlp] + processors: [attributes/ksCloud, batch] + exporters: + - debug/noop diff --git a/charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap b/charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap index 8d22cc5f..2a44cbaa 100644 --- a/charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap +++ b/charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap @@ -8581,6 +8581,10 @@ default capabilities: # exporters configure how to send processed data to one or more backends. exporters: + debug/noop: + verbosity: basic + sampling_initial: 0 + sampling_thereafter: 0 otlp/ksCloud: endpoint: ${env:CLOUD_OTEL_COLLECTOR_URL} tls: @@ -8605,6 +8609,11 @@ default capabilities: processors: [attributes/ksCloud, batch] exporters: - otlp/ksCloud + logs: + receivers: [otlp] + processors: [attributes/ksCloud, batch] + exporters: + - debug/noop kind: ConfigMap metadata: labels: @@ -8653,7 +8662,7 @@ default capabilities: template: metadata: annotations: - checksum/otel-config: 8a1e37e09cb696e8f8e797b73826c5342432714510487f981514cc3e985ff563 + checksum/otel-config: 75aa6667d9113e91bff2966bfdb24376a54f9c7167f7073f8d1adcf26972483b checksum/proxy-config: 3669c08e51ef779cd00a107f19592b34195c3ebdb60bedaf8ebf1491a3f2a747 labels: app: otel-collector @@ -12756,6 +12765,10 @@ disable otel: # exporters configure how to send processed data to one or more backends. exporters: + debug/noop: + verbosity: basic + sampling_initial: 0 + sampling_thereafter: 0 otlp/ksCloud: endpoint: ${env:CLOUD_OTEL_COLLECTOR_URL} tls: @@ -12780,6 +12793,11 @@ disable otel: processors: [attributes/ksCloud, batch] exporters: - otlp/ksCloud + logs: + receivers: [otlp] + processors: [attributes/ksCloud, batch] + exporters: + - debug/noop kind: ConfigMap metadata: labels: @@ -12828,7 +12846,7 @@ disable otel: template: metadata: annotations: - checksum/otel-config: 8a1e37e09cb696e8f8e797b73826c5342432714510487f981514cc3e985ff563 + checksum/otel-config: 75aa6667d9113e91bff2966bfdb24376a54f9c7167f7073f8d1adcf26972483b labels: app: otel-collector app.kubernetes.io/component: otel-collector