diff --git a/charts/nr-k8s-otel-collector/templates/_config_map.tpl b/charts/nr-k8s-otel-collector/templates/_config_map.tpl index 5223cb141a..1ed70d2eef 100644 --- a/charts/nr-k8s-otel-collector/templates/_config_map.tpl +++ b/charts/nr-k8s-otel-collector/templates/_config_map.tpl @@ -1,298 +1,282 @@ {{- /* Defines if the deployment config map has to be created or not */ -}} {{- define "nrKubernetesOtel.deployment.configMap.overrideConfig" -}} - {{- /* Look for a local creation of a deployment config map */ -}} {{- if get .Values.deployment "configMap" | kindIs "map" -}} - {{- if .Values.deployment.configMap.overrideConfig -}} - {{- toYaml .Values.deployment.configMap.overrideConfig -}} - {{- end -}} +{{- if .Values.deployment.configMap.overrideConfig -}} +{{- toYaml .Values.deployment.configMap.overrideConfig -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the deployment receivers have to be added to the config */ -}} {{- define "nrKubernetesOtel.deployment.configMap.extraConfig.receivers" -}} - {{- if get .Values.deployment "configMap" | kindIs "map" -}} - {{- if .Values.deployment.configMap.extraConfig -}} - {{- if .Values.deployment.configMap.extraConfig.receivers -}} - {{- toYaml .Values.deployment.configMap.extraConfig.receivers -}} - {{- end -}} - {{- end -}} +{{- if .Values.deployment.configMap.extraConfig -}} +{{- if .Values.deployment.configMap.extraConfig.receivers -}} +{{- toYaml .Values.deployment.configMap.extraConfig.receivers | indent 6 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the deployment processors have to be added to the config */ -}} {{- define "nrKubernetesOtel.deployment.configMap.extraConfig.processors" -}} - {{- if get .Values.deployment "configMap" | kindIs "map" -}} - {{- if .Values.deployment.configMap.extraConfig -}} - {{- if .Values.deployment.configMap.extraConfig.processors -}} - {{- toYaml .Values.deployment.configMap.extraConfig.processors -}} - {{- end -}} - {{- end -}} +{{- if .Values.deployment.configMap.extraConfig -}} +{{- if .Values.deployment.configMap.extraConfig.processors -}} +{{- toYaml .Values.deployment.configMap.extraConfig.processors | indent 6 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the deployment exporters have to be added to the config */ -}} {{- define "nrKubernetesOtel.deployment.configMap.extraConfig.exporters" -}} - {{- if get .Values.deployment "configMap" | kindIs "map" -}} - {{- if .Values.deployment.configMap.extraConfig -}} - {{- if .Values.deployment.configMap.extraConfig.exporters -}} - {{- toYaml .Values.deployment.configMap.extraConfig.exporters -}} - {{- end -}} - {{- end -}} +{{- if .Values.deployment.configMap.extraConfig -}} +{{- if .Values.deployment.configMap.extraConfig.exporters -}} +{{- toYaml .Values.deployment.configMap.extraConfig.exporters | indent 6 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the deployment connectors have to be added to the config */ -}} {{- define "nrKubernetesOtel.deployment.configMap.extraConfig.connectors" -}} - {{- if get .Values.deployment "configMap" | kindIs "map" -}} - {{- if .Values.deployment.configMap.extraConfig -}} - {{- if .Values.deployment.configMap.extraConfig.connectors -}} - {{- toYaml .Values.deployment.configMap.extraConfig.connectors -}} - {{- end -}} - {{- end -}} +{{- if .Values.deployment.configMap.extraConfig -}} +{{- if .Values.deployment.configMap.extraConfig.connectors -}} +{{- toYaml .Values.deployment.configMap.extraConfig.connectors | indent 6 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the deployment pipelines have to be added to the config */ -}} {{- define "nrKubernetesOtel.deployment.configMap.extraConfig.pipelines" -}} - {{- if get .Values.deployment "configMap" | kindIs "map" -}} - {{- if .Values.deployment.configMap.extraConfig -}} - {{- if .Values.deployment.configMap.extraConfig.pipelines -}} - {{- toYaml .Values.deployment.configMap.extraConfig.pipelines -}} - {{- end -}} - {{- end -}} +{{- if .Values.deployment.configMap.extraConfig -}} +{{- if .Values.deployment.configMap.extraConfig.pipelines -}} +{{- toYaml .Values.deployment.configMap.extraConfig.pipelines | indent 8 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the deployment extensions have to be added to the config */ -}} {{- define "nrKubernetesOtel.deployment.configMap.extraConfig.extensions" -}} - {{- if get .Values.deployment "configMap" | kindIs "map" -}} - {{- if .Values.deployment.configMap.extraConfig -}} - {{- if .Values.deployment.configMap.extraConfig.extensions -}} - {{- toYaml .Values.deployment.configMap.extraConfig.extensions -}} - {{- end -}} - {{- end -}} +{{- if .Values.deployment.configMap.extraConfig -}} +{{- if .Values.deployment.configMap.extraConfig.extensions -}} +{{- toYaml .Values.deployment.configMap.extraConfig.extensions -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the deployment service extensions have to be added to the config */ -}} {{- define "nrKubernetesOtel.deployment.configMap.extraConfig.service.extensions" -}} - {{- if get .Values.deployment "configMap" | kindIs "map" -}} - {{- if .Values.deployment.configMap.extraConfig -}} - {{- if .Values.deployment.configMap.extraConfig.service -}} - {{- if .Values.deployment.configMap.extraConfig.service.extensions -}} - {{- toYaml .Values.deployment.configMap.extraConfig.service.extensions -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.deployment.configMap.extraConfig -}} +{{- if .Values.deployment.configMap.extraConfig.service -}} +{{- if .Values.deployment.configMap.extraConfig.service.extensions -}} +{{- toYaml .Values.deployment.configMap.extraConfig.service.extensions -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the daemonset config map has to be created or not */ -}} {{- define "nrKubernetesOtel.daemonset.configMap.overrideConfig" -}} - {{- /* Look for a local creation of a daemonset config map */ -}} {{- if get .Values.daemonset "configMap" | kindIs "map" -}} - {{- if .Values.daemonset.configMap.overrideConfig -}} - {{- toYaml .Values.daemonset.configMap.overrideConfig -}} - {{- end -}} +{{- if .Values.daemonset.configMap.overrideConfig -}} +{{- toYaml .Values.daemonset.configMap.overrideConfig -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the daemonset receivers have to be added to the config */ -}} {{- define "nrKubernetesOtel.daemonset.configMap.extraConfig.receivers" -}} - {{- if get .Values.daemonset "configMap" | kindIs "map" -}} - {{- if .Values.daemonset.configMap.extraConfig -}} - {{- if .Values.daemonset.configMap.extraConfig.receivers -}} - {{- toYaml .Values.daemonset.configMap.extraConfig.receivers -}} - {{- end -}} - {{- end -}} +{{- if .Values.daemonset.configMap.extraConfig -}} +{{- if .Values.daemonset.configMap.extraConfig.receivers -}} +{{- toYaml .Values.daemonset.configMap.extraConfig.receivers | indent 6 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the daemonset processors have to be added to the config */ -}} {{- define "nrKubernetesOtel.daemonset.configMap.extraConfig.processors" -}} - {{- if get .Values.daemonset "configMap" | kindIs "map" -}} - {{- if .Values.daemonset.configMap.extraConfig -}} - {{- if .Values.daemonset.configMap.extraConfig.processors -}} - {{- toYaml .Values.daemonset.configMap.extraConfig.processors -}} - {{- end -}} - {{- end -}} +{{- if .Values.daemonset.configMap.extraConfig -}} +{{- if .Values.daemonset.configMap.extraConfig.processors -}} +{{- toYaml .Values.daemonset.configMap.extraConfig.processors | indent 6 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the daemonset exporters have to be added to the config */ -}} {{- define "nrKubernetesOtel.daemonset.configMap.extraConfig.exporters" -}} - {{- if get .Values.daemonset "configMap" | kindIs "map" -}} - {{- if .Values.daemonset.configMap.extraConfig -}} - {{- if .Values.daemonset.configMap.extraConfig.exporters -}} - {{- toYaml .Values.daemonset.configMap.extraConfig.exporters -}} - {{- end -}} - {{- end -}} +{{- if .Values.daemonset.configMap.extraConfig -}} +{{- if .Values.daemonset.configMap.extraConfig.exporters -}} +{{- toYaml .Values.daemonset.configMap.extraConfig.exporters | indent 6 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the daemonset connectors have to be added to the config */ -}} {{- define "nrKubernetesOtel.daemonset.configMap.extraConfig.connectors" -}} - {{- if get .Values.daemonset "configMap" | kindIs "map" -}} - {{- if .Values.daemonset.configMap.extraConfig -}} - {{- if .Values.daemonset.configMap.extraConfig.connectors -}} - {{- toYaml .Values.daemonset.configMap.extraConfig.connectors -}} - {{- end -}} - {{- end -}} +{{- if .Values.daemonset.configMap.extraConfig -}} +{{- if .Values.daemonset.configMap.extraConfig.connectors -}} +{{- toYaml .Values.daemonset.configMap.extraConfig.connectors | indent 6 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the daemonset pipelines have to be added to the config */ -}} {{- define "nrKubernetesOtel.daemonset.configMap.extraConfig.pipelines" -}} - {{- if get .Values.daemonset "configMap" | kindIs "map" -}} - {{- if .Values.daemonset.configMap.extraConfig -}} - {{- if .Values.daemonset.configMap.extraConfig.pipelines -}} - {{- toYaml .Values.daemonset.configMap.extraConfig.pipelines -}} - {{- end -}} - {{- end -}} +{{- if .Values.daemonset.configMap.extraConfig -}} +{{- if .Values.daemonset.configMap.extraConfig.pipelines -}} +{{- toYaml .Values.daemonset.configMap.extraConfig.pipelines | indent 8 -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the daemonset extensions have to be added to the config */ -}} {{- define "nrKubernetesOtel.daemonset.configMap.extraConfig.extensions" -}} - {{- if get .Values.daemonset "configMap" | kindIs "map" -}} - {{- if .Values.daemonset.configMap.extraConfig -}} - {{- if .Values.daemonset.configMap.extraConfig.extensions -}} - {{- toYaml .Values.daemonset.configMap.extraConfig.extensions -}} - {{- end -}} - {{- end -}} +{{- if .Values.daemonset.configMap.extraConfig -}} +{{- if .Values.daemonset.configMap.extraConfig.extensions -}} +{{- toYaml .Values.daemonset.configMap.extraConfig.extensions -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if the daemonset service extensions have to be added to the config */ -}} {{- define "nrKubernetesOtel.daemonset.configMap.extraConfig.service.extensions" -}} - {{- if get .Values.daemonset "configMap" | kindIs "map" -}} - {{- if .Values.daemonset.configMap.extraConfig -}} - {{- if .Values.daemonset.configMap.extraConfig.service -}} - {{- if .Values.daemonset.configMap.extraConfig.service.extensions -}} - {{- toYaml .Values.daemonset.configMap.extraConfig.service.extensions -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.daemonset.configMap.extraConfig -}} +{{- if .Values.daemonset.configMap.extraConfig.service -}} +{{- if .Values.daemonset.configMap.extraConfig.service.extensions -}} +{{- toYaml .Values.daemonset.configMap.extraConfig.service.extensions -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- end -}} {{- /* Defines if custom otel processors will be added to the config */ -}} {{- define "nrKubernetesOtel.custom.processors" -}} - {{- if .Values.processors -}} - {{- toYaml .Values.processors -}} - {{- end -}} +{{- if .Values.processors -}} +{{- toYaml .Values.processors | indent 6 -}} +{{- end -}} {{- end -}} {{- /* Defines if custom otel exporters will be added to the config */ -}} {{- define "nrKubernetesOtel.custom.exporters" -}} - {{- if .Values.exporters -}} - {{- toYaml .Values.exporters -}} - {{- end -}} +{{- if .Values.exporters -}} +{{- toYaml .Values.exporters | indent 6 -}} +{{- end -}} {{- end -}} {{- /* Defines what processors to include in the metrics preprocessor pipeline */ -}} {{- define "nrKubernetesOtel.metricsPipeline.collectorIngress.processors" -}} - {{- if .Values.metricsPipeline -}} - {{- if .Values.metricsPipeline.collectorIngress -}} - {{- if .Values.metricsPipeline.collectorIngress.processors -}} - {{- toYaml .Values.metricsPipeline.collectorIngress.processors -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.metricsPipeline -}} +{{- if .Values.metricsPipeline.collectorIngress -}} +{{- if .Values.metricsPipeline.collectorIngress.processors -}} +{{- toYaml .Values.metricsPipeline.collectorIngress.processors -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- /* Defines what exporters to include in the metrics preprocessor pipeline */ -}} {{- define "nrKubernetesOtel.metricsPipeline.collectorIngress.exporters" -}} - {{- if .Values.metricsPipeline -}} - {{- if .Values.metricsPipeline.collectorIngress -}} - {{- if .Values.metricsPipeline.collectorIngress.exporters -}} - {{- toYaml .Values.metricsPipeline.collectorIngress.exporters -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.metricsPipeline -}} +{{- if .Values.metricsPipeline.collectorIngress -}} +{{- if .Values.metricsPipeline.collectorIngress.exporters -}} +{{- toYaml .Values.metricsPipeline.collectorIngress.exporters -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- /* Defines what processors to include in the metrics postprocessor pipeline */ -}} {{- define "nrKubernetesOtel.metricsPipeline.collectorEgress.processors" -}} - {{- if .Values.metricsPipeline -}} - {{- if .Values.metricsPipeline.collectorEgress -}} - {{- if .Values.metricsPipeline.collectorEgress.processors -}} - {{- toYaml .Values.metricsPipeline.collectorEgress.processors -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.metricsPipeline -}} +{{- if .Values.metricsPipeline.collectorEgress -}} +{{- if .Values.metricsPipeline.collectorEgress.processors -}} +{{- toYaml .Values.metricsPipeline.collectorEgress.processors -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- /* Defines what exporters to include in the metrics postprocessor pipeline */ -}} {{- define "nrKubernetesOtel.metricsPipeline.collectorEgress.exporters" -}} - {{- if .Values.metricsPipeline -}} - {{- if .Values.metricsPipeline.collectorEgress -}} - {{- if .Values.metricsPipeline.collectorEgress.exporters -}} - {{- toYaml .Values.metricsPipeline.collectorEgress.exporters -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.metricsPipeline -}} +{{- if .Values.metricsPipeline.collectorEgress -}} +{{- if .Values.metricsPipeline.collectorEgress.exporters -}} +{{- toYaml .Values.metricsPipeline.collectorEgress.exporters -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- /* Defines what processors to include in the logs preprocessor pipeline */ -}} {{- define "nrKubernetesOtel.logsPipeline.collectorIngress.processors" -}} - {{- if .Values.logsPipeline -}} - {{- if .Values.logsPipeline.collectorIngress -}} - {{- if .Values.logsPipeline.collectorIngress.processors -}} - {{- toYaml .Values.logsPipeline.collectorIngress.processors -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.logsPipeline -}} +{{- if .Values.logsPipeline.collectorIngress -}} +{{- if .Values.logsPipeline.collectorIngress.processors -}} +{{- toYaml .Values.logsPipeline.collectorIngress.processors -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- /* Defines what exporters to include in the logs preprocessor pipeline */ -}} {{- define "nrKubernetesOtel.logsPipeline.collectorIngress.exporters" -}} - {{- if .Values.logsPipeline -}} - {{- if .Values.logsPipeline.collectorIngress -}} - {{- if .Values.logsPipeline.collectorIngress.exporters -}} - {{- toYaml .Values.logsPipeline.collectorIngress.exporters -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.logsPipeline -}} +{{- if .Values.logsPipeline.collectorIngress -}} +{{- if .Values.logsPipeline.collectorIngress.exporters -}} +{{- toYaml .Values.logsPipeline.collectorIngress.exporters -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- /* Defines what processors to include in the logs postprocessor pipeline */ -}} {{- define "nrKubernetesOtel.logsPipeline.collectorEgress.processors" -}} - {{- if .Values.logsPipeline -}} - {{- if .Values.logsPipeline.collectorEgress -}} - {{- if .Values.logsPipeline.collectorEgress.processors -}} - {{- toYaml .Values.logsPipeline.collectorEgress.processors -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.logsPipeline -}} +{{- if .Values.logsPipeline.collectorEgress -}} +{{- if .Values.logsPipeline.collectorEgress.processors -}} +{{- toYaml .Values.logsPipeline.collectorEgress.processors -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- /* Defines what exporters to include in the logs postprocessor pipeline */ -}} {{- define "nrKubernetesOtel.logsPipeline.collectorEgress.exporters" -}} - {{- if .Values.logsPipeline -}} - {{- if .Values.logsPipeline.collectorEgress -}} - {{- if .Values.logsPipeline.collectorEgress.exporters -}} - {{- toYaml .Values.logsPipeline.collectorEgress.exporters -}} - {{- end -}} - {{- end -}} - {{- end -}} +{{- if .Values.logsPipeline -}} +{{- if .Values.logsPipeline.collectorEgress -}} +{{- if .Values.logsPipeline.collectorEgress.exporters -}} +{{- toYaml .Values.logsPipeline.collectorEgress.exporters -}} +{{- end -}} +{{- end -}} +{{- end -}} {{- end -}} {{- /* Parse KSM selector and return the Prometheus label key */ -}} diff --git a/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml b/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml index 7e5b52616f..99b4bc6491 100644 --- a/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml +++ b/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml @@ -8,10 +8,10 @@ metadata: data: daemonset-config.yaml: | {{- with include "nrKubernetesOtel.daemonset.configMap.overrideConfig" . }} - {{- . | nindent 4 }} + {{- . }} {{- else }} receivers: - {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.receivers" . | nindent 6 }} + {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.receivers" . }} hostmetrics: # TODO (chris): this is a linux specific configuration {{- if not (or (include "newrelic.common.gkeAutopilot" .) (include "newrelic.common.openShift" .)) }} @@ -218,8 +218,8 @@ data: processors: - {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.processors" . | nindent 6 }} - {{- include "nrKubernetesOtel.custom.processors" . | nindent 6 }} + {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.processors" . }} + {{- include "nrKubernetesOtel.custom.processors" . }} groupbyattrs: keys: @@ -804,8 +804,8 @@ data: send_batch_size : 800 exporters: - {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.exporters" . | nindent 6 }} - {{- include "nrKubernetesOtel.custom.exporters" . | nindent 6 }} + {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.exporters" . }} + {{- include "nrKubernetesOtel.custom.exporters" . }} otlphttp/newrelic: endpoint: {{ include "nrKubernetesOtel.endpoint" . }} @@ -813,7 +813,7 @@ data: api-key: ${env:NR_LICENSE_KEY} connectors: - {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.connectors" . | nindent 6 }} + {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.connectors" . }} routing/nr_logs_pipelines: default_pipelines: [logs/pipeline] @@ -876,13 +876,13 @@ data: {{- with include "nrKubernetesOtel.daemonset.configMap.extraConfig.extensions" . }} extensions: - {{- . | nindent 6 }} + {{- . }} {{- end }} service: {{- with include "nrKubernetesOtel.daemonset.configMap.extraConfig.service.extensions" . }} extensions: - {{- . | nindent 8 }} + {{- . }} {{- end }} telemetry: {{- if include "newrelic.common.verboseLog" . }} @@ -909,7 +909,7 @@ data: api-key: ${env:NR_LICENSE_KEY} {{- end }} pipelines: - {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.pipelines" . | nindent 8 }} + {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.pipelines" . }} {{- if or .Values.receivers.hostmetrics.enabled (or .Values.receivers.kubeletstats.enabled .Values.receivers.prometheus.enabled) }} metrics/ingress: @@ -925,10 +925,10 @@ data: {{- end }} processors: - metricsgeneration/calculate_percentage_for_pods - {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.processors" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.processors" . }} exporters: - routing/nr_metrics_pipelines - {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.exporters" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.exporters" . }} {{- if .Values.receivers.kubeletstats.enabled }} metrics/ingress_aggregation: @@ -939,10 +939,10 @@ data: - metricstransform/sum_container_metrics_per_node - metricsgeneration/calculate_percentage - filter/keep_only_generated_metrics - {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.processors" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.processors" . }} exporters: - routing/nr_metrics_pipelines - {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.exporters" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.exporters" . }} {{- end }} metrics/nr: @@ -1036,21 +1036,21 @@ data: - routing/metrics_egress processors: - transform/extract_runtime - {{- include "nrKubernetesOtel.metricsPipeline.collectorEgress.processors" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorEgress.processors" . }} - batch exporters: - otlphttp/newrelic - {{- include "nrKubernetesOtel.metricsPipeline.collectorEgress.exporters" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorEgress.exporters" . }} {{- if and .Values.receivers.filelog.enabled (not (include "newrelic.common.gkeAutopilot" .)) }} logs/ingress: receivers: - filelog processors: - {{- include "nrKubernetesOtel.logsPipeline.collectorIngress.processors" . | nindent 12 }} + {{- include "nrKubernetesOtel.logsPipeline.collectorIngress.processors" . }} exporters: - routing/nr_logs_pipelines - {{- include "nrKubernetesOtel.logsPipeline.collectorIngress.exporters" . | nindent 12 }} + {{- include "nrKubernetesOtel.logsPipeline.collectorIngress.exporters" . }} logs/pipeline: receivers: @@ -1067,11 +1067,11 @@ data: receivers: - routing/logs_egress processors: - {{- include "nrKubernetesOtel.logsPipeline.collectorEgress.processors" . | nindent 12 }} + {{- include "nrKubernetesOtel.logsPipeline.collectorEgress.processors" . }} - batch exporters: - otlphttp/newrelic - {{- include "nrKubernetesOtel.logsPipeline.collectorEgress.exporters" . | nindent 12 }} + {{- include "nrKubernetesOtel.logsPipeline.collectorEgress.exporters" . }} {{- end }} {{- end }} diff --git a/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml b/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml index 1173fb575b..dcc149defe 100644 --- a/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml +++ b/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml @@ -8,10 +8,10 @@ metadata: data: deployment-config.yaml: | {{- with include "nrKubernetesOtel.deployment.configMap.overrideConfig" . }} - {{- . | nindent 4 }} + {{- . }} {{- else }} receivers: - {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.receivers" . | nindent 6 }} + {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.receivers" . }} otlp: protocols: http: @@ -179,8 +179,8 @@ data: {{- end }} processors: - {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.processors" . | nindent 6 }} - {{- include "nrKubernetesOtel.custom.processors" . | nindent 6 }} + {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.processors" . }} + {{- include "nrKubernetesOtel.custom.processors" . }} transform/promote_job_label: metric_statements: @@ -738,15 +738,15 @@ data: send_batch_size : 800 exporters: - {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.exporters" . | nindent 6 }} - {{- include "nrKubernetesOtel.custom.exporters" . | nindent 6 }} + {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.exporters" . }} + {{- include "nrKubernetesOtel.custom.exporters" . }} otlphttp/newrelic: endpoint: {{ include "nrKubernetesOtel.endpoint" . }} headers: api-key: ${env:NR_LICENSE_KEY} connectors: - {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.connectors" . | nindent 6 }} + {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.connectors" . }} routing/nr_logs_pipelines: default_pipelines: [logs/pipeline] @@ -788,13 +788,13 @@ data: {{- with include "nrKubernetesOtel.deployment.configMap.extraConfig.extensions" . }} extensions: - {{- . | nindent 6 }} + {{- . }} {{- end }} service: {{- with include "nrKubernetesOtel.deployment.configMap.extraConfig.service.extensions" . }} extensions: - {{- . | nindent 8 }} + {{- . }} {{- end }} telemetry: {{- if include "newrelic.common.verboseLog" . }} @@ -821,7 +821,7 @@ data: api-key: ${env:NR_LICENSE_KEY} {{- end }} pipelines: - {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.pipelines" . | nindent 8 }} + {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.pipelines" . }} {{- if .Values.receivers.prometheus.enabled }} metrics/ingress: @@ -832,11 +832,11 @@ data: - prometheus/collector {{- end }} processors: - {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.processors" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.processors" . }} - transform/promote_job_label exporters: - routing/nr_metrics_pipelines - {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.exporters" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorIngress.exporters" . }} metrics/nr_ksm: receivers: @@ -905,11 +905,11 @@ data: processors: - transform/remove_routing_metadata - transform/extract_runtime - {{- include "nrKubernetesOtel.metricsPipeline.collectorEgress.processors" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorEgress.processors" . }} - batch exporters: - otlphttp/newrelic - {{- include "nrKubernetesOtel.metricsPipeline.collectorEgress.exporters" . | nindent 12 }} + {{- include "nrKubernetesOtel.metricsPipeline.collectorEgress.exporters" . }} {{- if .Values.receivers.k8sEvents.enabled }} @@ -917,10 +917,10 @@ data: receivers: - k8s_events processors: - {{- include "nrKubernetesOtel.logsPipeline.collectorIngress.processors" . | nindent 12 }} + {{- include "nrKubernetesOtel.logsPipeline.collectorIngress.processors" . }} exporters: - routing/nr_logs_pipelines - {{- include "nrKubernetesOtel.logsPipeline.collectorIngress.exporters" . | nindent 12 }} + {{- include "nrKubernetesOtel.logsPipeline.collectorIngress.exporters" . }} logs/pipeline: receivers: - routing/nr_logs_pipelines @@ -935,10 +935,10 @@ data: receivers: - routing/logs_egress processors: - {{- include "nrKubernetesOtel.logsPipeline.collectorEgress.processors" . | nindent 12 }} + {{- include "nrKubernetesOtel.logsPipeline.collectorEgress.processors" . }} - batch exporters: - otlphttp/newrelic - {{- include "nrKubernetesOtel.logsPipeline.collectorEgress.exporters" . | nindent 12 }} + {{- include "nrKubernetesOtel.logsPipeline.collectorEgress.exporters" . }} {{- end }} {{- end }}