From ec44b3c6882929e13dfe0e95ea23f6d99e7da5c7 Mon Sep 17 00:00:00 2001 From: Pawel Szkamruk Date: Tue, 12 Nov 2024 15:07:35 +0100 Subject: [PATCH] moving to closer to similar configurations --- .../templates/config/_otel-k8s-cluster-receiver-config.tpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl index aaecfe80f6..bcbf8c0460 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl @@ -73,7 +73,7 @@ receivers: {{- end }} processors: - {{- include "splunk-otel-collector.k8sClusterReceiverAttributesProcessor" . | nindent 2 }} +{{/* {{- include "splunk-otel-collector.k8sClusterReceiverAttributesProcessor" . | nindent 2 }}*/}} {{- include "splunk-otel-collector.otelMemoryLimiterConfig" . | nindent 2 }} {{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" $) "true") }} @@ -118,6 +118,10 @@ processors: - set(resource.attributes["com.splunk.sourcetype"], Concat(["kube:object:", attributes["k8s.resource.name"]], "")) {{- end }} + {{- if and $clusterReceiver.eventsEnabled (eq (include "splunk-otel-collector.logsEnabled" .) "true") }} + {{- include "splunk-otel-collector.k8sClusterReceiverAttributesProcessor" . | nindent 2 }} + {{- end }} + # Resource attributes specific to the collector itself. resource/add_collector_k8s: attributes: