From 1c65741a4abc81974f693f6451ef44dbb89af996 Mon Sep 17 00:00:00 2001 From: jvoravong Date: Tue, 27 Jun 2023 17:24:15 -0600 Subject: [PATCH] patch --- .../splunk-otel-collector/templates/operator/_helpers.tpl | 2 +- .../templates/operator/_instrumentationSpec.yaml | 2 +- .../templates/operator/instrumentation.yaml | 2 +- helm-charts/splunk-otel-collector/values.yaml | 3 --- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/helm-charts/splunk-otel-collector/templates/operator/_helpers.tpl b/helm-charts/splunk-otel-collector/templates/operator/_helpers.tpl index 1967a51b42..4f88e55025 100644 --- a/helm-charts/splunk-otel-collector/templates/operator/_helpers.tpl +++ b/helm-charts/splunk-otel-collector/templates/operator/_helpers.tpl @@ -1,7 +1,7 @@ {{- define "validation-rules" -}} {{- $tracesEnabled := or (include "splunk-otel-collector.platformTracesEnabled" .) (include "splunk-otel-collector.o11yTracesEnabled" .) -}} {{- $endpointOverridden := and .Values.operator.instrumentation.spec .Values.operator.instrumentation.spec.exporter .Values.operator.instrumentation.spec.exporter.endpoint (ne .Values.operator.instrumentation.spec.exporter.endpoint "") -}} -{{- if and .Values.operator.enabled .Values.operator.instrumentation.create $tracesEnabled (not $endpointOverridden) -}} +{{- if and .Values.operator.enabled $tracesEnabled (not $endpointOverridden) -}} {{/* If no endpoint override was provided, the environment variable/tag must be set by the agent, gateway, or instrumentation.*/}} {{- if or (not .Values.environment) (eq .Values.environment "") -}} {{- $envSet := false -}} diff --git a/helm-charts/splunk-otel-collector/templates/operator/_instrumentationSpec.yaml b/helm-charts/splunk-otel-collector/templates/operator/_instrumentationSpec.yaml index e494dc88f8..14fb00ace8 100644 --- a/helm-charts/splunk-otel-collector/templates/operator/_instrumentationSpec.yaml +++ b/helm-charts/splunk-otel-collector/templates/operator/_instrumentationSpec.yaml @@ -1,5 +1,5 @@ {{- define "splunk-otel-collector.operator.instrumentation.spec" -}} -{{- if and .Values.operator.enabled .Values.operator.instrumentation.create }} +{{- if .Values.operator.enabled }} exporter: endpoint: {{- include "splunk-otel-collector.operator.instrumentation.exporter.endpoint" . | nindent 4 }} propagators: diff --git a/helm-charts/splunk-otel-collector/templates/operator/instrumentation.yaml b/helm-charts/splunk-otel-collector/templates/operator/instrumentation.yaml index dfd7079560..d4c9a23239 100644 --- a/helm-charts/splunk-otel-collector/templates/operator/instrumentation.yaml +++ b/helm-charts/splunk-otel-collector/templates/operator/instrumentation.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.operator.enabled .Values.operator.instrumentation.create }} +{{- if .Values.operator.enabled }} {{- include "validation-rules" . -}} apiVersion: opentelemetry.io/v1alpha1 kind: Instrumentation diff --git a/helm-charts/splunk-otel-collector/values.yaml b/helm-charts/splunk-otel-collector/values.yaml index cef11338cd..58fbb1626c 100644 --- a/helm-charts/splunk-otel-collector/values.yaml +++ b/helm-charts/splunk-otel-collector/values.yaml @@ -1369,7 +1369,6 @@ operator: enabled: false # For more details, refer to: https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md#instrumentation instrumentation: - create: true # Overrides for default instrumentation configurations can be specified here. spec: # Optional "endpoint" parameter for exporting data to a specific target. @@ -1381,13 +1380,11 @@ operator: # Optional "sampler" parameter for enabling trace sampling. # Refer to: https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_traces_sampler - # Uncomment the following lines to specify a sampler: # sampler: # type: traceidratio # argument: "0.95" # Optional "environment variable" parameters that can configure all instrumentation libraries. - # Uncomment the following lines to specify environment variables: # env: # # Sets the deployment.environment tag on spans # - name: OTEL_RESOURCE_ATTRIBUTES