diff --git a/CHANGELOG.md b/CHANGELOG.md index 03b9b789cb..6026adf09b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed +- Change configuration interface to be able to send data to Splunk + Enterprise/Cloud and to Splunk Observability (#209) - Improve multiline logs configuration for native logs collection (#208) ## [0.35.3] - 2021-09-29 diff --git a/Makefile b/Makefile index f7579cbe26..8b491febd3 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ render: helm template \ --namespace default \ --values rendered/values.yaml \ - --set metricsEnabled=false,tracesEnabled=false,logsEnabled=false,$${i}Enabled=true \ + --set splunkObservability.metricsEnabled=false,splunkObservability.tracesEnabled=false,splunkObservability.logsEnabled=false,splunkObservability.$${i}Enabled=true \ --output-dir "$$dir" \ default helm-charts/splunk-otel-collector; \ mv "$$dir"/splunk-otel-collector/templates/* "$$dir"; \ diff --git a/README.md b/README.md index 348127288b..c999957a99 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,11 @@ The Splunk OpenTelemetry Connector for Kubernetes is a of OpenTelemetry Collector](https://github.com/signalfx/splunk-otel-collector). This chart creates a Kubernetes DaemonSet along with other Kubernetes objects in a Kubernetes cluster and provides a unified way to receive, process and -export metric, trace, and log data for [Splunk Observability -Cloud](https://www.observability.splunk.com/). +export metric, trace, and log data for: + +- [Splunk Enterprise](https://www.splunk.com/en_us/software/splunk-enterprise.html) +- [Splunk Cloud Platform](https://www.splunk.com/en_us/software/splunk-cloud-platform.html) +- [Splunk Observability Cloud](https://www.observability.splunk.com/) **Installations that use this distribution can receive direct help from Splunk's support teams.** Customers are free to use the core OpenTelemetry OSS @@ -99,27 +102,45 @@ require additional configurations applied to ### Prerequisites -The following components required to use the helm chart: +The following prerequisites are required to use the helm chart: - [Helm 3](https://helm.sh/docs/intro/install/) (Helm 2 is not supported) - [Kubernetes cluster](https://kubernetes.io/) -- [Splunk Access Token](https://docs.splunk.com/Observability/admin/authentication-tokens/org-tokens.html#admin-org-tokens) -- [Splunk Realm](https://dev.splunk.com/observability/docs/realms_in_endpoints/) + +- To send data to [Splunk Enterprise/Cloud](https://docs.splunk.com/Documentation/Splunk/8.2.2/Data/UsetheHTTPEventCollector) + - HEC Token + - HEC Endpoint + +- To send data to [Splunk Observability Cloud](https://docs.splunk.com/Observability/gdi/opentelemetry/install-k8s.html) + - [Splunk Access Token](https://docs.splunk.com/Observability/admin/authentication-tokens/org-tokens.html#admin-org-tokens) + - [Splunk Realm](https://dev.splunk.com/observability/docs/realms_in_endpoints/) ### How to install -To install splunk-otel-collector in k8s cluster at least three parameters must be provided: +To install splunk-otel-collector in k8s cluster at one of the configuration groups +`spunkPlatform` or `splunkObservability` has to be fully configured. + +For Splunk Enterprise/Cloud the following parameters are required: + +- `spunkPlatform.endpoint`: URL to a Splunk instance, e.g. + "http://localhost:8088/services/collector" +- `spunkPlatform.token`: Splunk HTTP Event Collector token -- `splunkRealm` (default `us0`): Splunk realm to send telemetry data to. -- `splunkAccessToken`: Your Splunk org access token. -- `clusterName`: arbitrary value that will identify your Kubernetes cluster in Splunk. +For Splunk Observability Cloud the following parameters are required: -To deploy the chart run the following commands replacing the parameters above -with their appropriate values. +- `splunkObservability.splunkRealm` (default `us0`): Splunk realm to send + telemetry data to. +- `splunkObservability.splunkAccessToken`: Your Splunk Observability org access + token. +- `clusterName`: arbitrary value that will identify your Kubernetes cluster in + Splunk Observability Cloud. + +To deploy the chart to send data to Splunk Observability Cloud run the following +commands replacing the parameters above with their appropriate values. ```bash $ helm repo add splunk-otel-collector-chart https://signalfx.github.io/splunk-otel-collector-chart -$ helm install my-splunk-otel-collector --set="splunkRealm=us0,splunkAccessToken=xxxxxx,clusterName=my-cluster" splunk-otel-collector-chart/splunk-otel-collector +$ helm install my-splunk-otel-collector --set="splunkObservability.splunkRealm=us0,splunkObservability.splunkAccessToken=xxxxxx,clusterName=my-cluster" splunk-otel-collector-chart/splunk-otel-collector ``` Instead of setting helm values as arguments a yaml file can be provided: @@ -148,12 +169,23 @@ explanation. Read through it to understand how to configure this chart. Also check [examples of chart configuration](./examples/README.md). This also includes a guide to deploy for the k8s cluster with the windows worker node. -At the minimum you need to configure the following values. +At the minimum you need to configure the following values to send data to Splunk +Enterprise/Cloud. + +```yaml +splunkPlatform: + token: xxxxxx + endpoint: http://localhost:8088/services/collector +``` + +At the minimum you need to configure the following values to send data to Splunk +Observability Cloud. ```yaml +splunkObservability: + accessToken: xxxxxx + realm: us0 clusterName: my-k8s-cluster -splunkAccessToken: xxxxxx -splunkRealm: us0 ``` ### Cloud provider @@ -192,19 +224,21 @@ environment: production ### Disable particular types of telemetry -By default all telemetry data (metrics, traces and logs) is collected from the Kubernetes cluster. -It's possible to disable any kind of telemetry with the following parameters: - -- `metricsEnabled`: `false` -- `tracesEnabled`: `false` -- `logsEnabled`: `false` - -For example, to install the connector only for logs: +By default all telemetry data (metrics, traces and logs) is collected from the +Kubernetes cluster and sent to one of (or both) configured destinations. It's +possible to disable any kind of telemetry for a specific destination. For +example, the following configuration will send logs to Splunk Platform and +metrics and traces to Splunk Observability assuming that both destinations are +configured properly. -```bash -$ helm install my-splunk-otel-collector \ - --set="splunkRealm=us0,splunkAccessToken=xxxxxx,clusterName=my-cluster,metricsEnabled=false,tracesEnabled=false" \ - splunk-otel-collector-chart/splunk-otel-collector +```yaml +splunkObservability: + metricsEnabled: true + tracesEnabled: true + logsEnabled: false +splunkPlatform: + metricsEnabled: false + logsEnabled: true ``` ## Logs collection @@ -266,6 +300,22 @@ The [rendered directory](rendered) contains pre-rendered Kubernetes resource man ## Upgrade guidelines +### 0.35.3 to 0.36.0 + +[#208 Configuration interface changed to support both Splunk Enterprise/Cloud and Splunk Observability destinations](https://github.com/signalfx/splunk-otel-collector-chart/pull/208) + +The following parameters required to send data to Splunk Observability are now +deprecated and moved under `splunkObservability` group. They need to be updated +in your custom values.yaml files before backward compatibility is discontinued. + +- `splunkRealm` changed to `splunkObservability.realm` +- `splunkAccessToken` changed to `splunkObservability.accessToken` +- `ingestUrl` changed to `splunkObservability.ingestUrl` +- `apiUrl` changed to `splunkObservability.ingestUrl` +- `metricsEnabled` changed to `splunkObservability.metricsEnabled` +- `tracesEnabled` changed to `splunkObservability.tracesEnabled` +- `logsEnabled` changed to `splunkObservability.logsEnabled` + ### 0.26.4 to 0.27.0 [#163 Auto-detection of prometheus metrics is disabled by default](https://github.com/signalfx/splunk-otel-collector-chart/pull/163): diff --git a/examples/README.md b/examples/README.md index a754e7c0b3..f1fd698836 100644 --- a/examples/README.md +++ b/examples/README.md @@ -11,10 +11,22 @@ helm install my-splunk-otel-collector --values my-values.yaml splunk-otel-collec ``` All of the provided examples must also include the required parameters: + +```yaml +# Splunk Platform required parameters +splunkPlatform: + token: xxxxxx + endpoint: http://localhost:8088/services/collector +``` + +or + ```yaml +# Splunk Observability required parameters clusterName: my-cluster -splunkRealm: us0 -splunkAccessToken: my-access-token +splunkObservability: + realm: us0 + accessToken: my-access-token ``` ## Deploy for k8s cluster with windows worker node. diff --git a/examples/add-sampler-values.yaml b/examples/add-sampler-values.yaml index 511c5f7818..b51023fc11 100644 --- a/examples/add-sampler-values.yaml +++ b/examples/add-sampler-values.yaml @@ -1,6 +1,7 @@ clusterName: my-cluster -splunkRealm: us0 -splunkAccessToken: my-access-token +splunkObservability: + realm: us0 + accessToken: my-access-token otelAgent: config: diff --git a/examples/crio-logging-values.yaml b/examples/crio-logging-values.yaml index 6d4bda1022..031365cd51 100644 --- a/examples/crio-logging-values.yaml +++ b/examples/crio-logging-values.yaml @@ -1,6 +1,7 @@ clusterName: my-cluster -splunkRealm: us0 -splunkAccessToken: my-access-token +splunkObservability: + realm: us0 + accessToken: my-access-token fluentd: config: diff --git a/examples/enable-gateway-values.yaml b/examples/enable-gateway-values.yaml index fb745f76e2..e7b601f6e9 100644 --- a/examples/enable-gateway-values.yaml +++ b/examples/enable-gateway-values.yaml @@ -1,6 +1,7 @@ clusterName: my-cluster -splunkRealm: us0 -splunkAccessToken: my-access-token +splunkObservability: + realm: us0 + accessToken: my-access-token otelCollector: enabled: true diff --git a/examples/gateway-only-values.yaml b/examples/gateway-only-values.yaml index 20a5e3c918..fc56f4825a 100644 --- a/examples/gateway-only-values.yaml +++ b/examples/gateway-only-values.yaml @@ -1,6 +1,7 @@ clusterName: my-cluster -splunkRealm: us0 -splunkAccessToken: my-access-token +splunkObservability: + realm: us0 + accessToken: my-access-token otelCollector: enabled: true diff --git a/examples/parse-java-stacktrace-values.yaml b/examples/parse-java-stacktrace-values.yaml index 0c94675f85..8925710cee 100644 --- a/examples/parse-java-stacktrace-values.yaml +++ b/examples/parse-java-stacktrace-values.yaml @@ -1,6 +1,7 @@ clusterName: my-cluster -splunkRealm: us0 -splunkAccessToken: my-access-token +splunkObservability: + realm: us0 + accessToken: my-access-token fluentd: config: diff --git a/examples/use-custom-gateway-values.yaml b/examples/use-custom-gateway-values.yaml index c71e0f6588..0304a34169 100644 --- a/examples/use-custom-gateway-values.yaml +++ b/examples/use-custom-gateway-values.yaml @@ -1,6 +1,7 @@ clusterName: my-cluster -splunkRealm: us0 -splunkAccessToken: my-access-token +splunkObservability: + realm: us0 + accessToken: my-access-token otelAgent: config: diff --git a/examples/use-proxy-values.yaml b/examples/use-proxy-values.yaml index 80eb51b960..373d8bbbb0 100644 --- a/examples/use-proxy-values.yaml +++ b/examples/use-proxy-values.yaml @@ -1,6 +1,7 @@ clusterName: my-cluster -splunkRealm: us0 -splunkAccessToken: my-access-token +splunkObservability: + realm: us0 + accessToken: my-access-token otelAgent: extraEnvs: diff --git a/helm-charts/splunk-otel-collector/ci/basic-values.yaml b/helm-charts/splunk-otel-collector/ci/basic-values.yaml index 737605e03c..ebe1cc222c 100644 --- a/helm-charts/splunk-otel-collector/ci/basic-values.yaml +++ b/helm-charts/splunk-otel-collector/ci/basic-values.yaml @@ -1,6 +1,7 @@ clusterName: fake-cluster -splunkRealm: fake-realm -splunkAccessToken: fake-token +splunkObservability: + realm: fake-realm + accessToken: fake-token # Logs collection config for Kind cluster fluentd: diff --git a/helm-charts/splunk-otel-collector/ci/logs-only-values.yaml b/helm-charts/splunk-otel-collector/ci/logs-only-values.yaml index 5592b78ac2..2d6aaad713 100644 --- a/helm-charts/splunk-otel-collector/ci/logs-only-values.yaml +++ b/helm-charts/splunk-otel-collector/ci/logs-only-values.yaml @@ -1,6 +1,7 @@ clusterName: fake-cluster -splunkRealm: fake-realm -splunkAccessToken: fake-token +splunkObservability: + realm: fake-realm + accessToken: fake-token tracesEnabled: false metricsEnabled: false diff --git a/helm-charts/splunk-otel-collector/ci/sampler-gateway-env-vars-java-logs-values.yaml b/helm-charts/splunk-otel-collector/ci/sampler-gateway-env-vars-java-logs-values.yaml index b860c4a6da..fa7b0377fe 100644 --- a/helm-charts/splunk-otel-collector/ci/sampler-gateway-env-vars-java-logs-values.yaml +++ b/helm-charts/splunk-otel-collector/ci/sampler-gateway-env-vars-java-logs-values.yaml @@ -1,6 +1,7 @@ clusterName: fake-cluster -splunkRealm: fake-realm -splunkAccessToken: fake-token +splunkObservability: + realm: fake-realm + accessToken: fake-token otelAgent: config: diff --git a/helm-charts/splunk-otel-collector/ci/use-custom-gateway-values.yaml b/helm-charts/splunk-otel-collector/ci/use-custom-gateway-values.yaml index eeaa3bf255..94ff2f92b2 100644 --- a/helm-charts/splunk-otel-collector/ci/use-custom-gateway-values.yaml +++ b/helm-charts/splunk-otel-collector/ci/use-custom-gateway-values.yaml @@ -1,4 +1,5 @@ clusterName: my-cluster +# Validate backward compatible parameters splunkRealm: us0 splunkAccessToken: my-access-token diff --git a/helm-charts/splunk-otel-collector/templates/NOTES.txt b/helm-charts/splunk-otel-collector/templates/NOTES.txt index e69de29bb2..f79c88d2c2 100644 --- a/helm-charts/splunk-otel-collector/templates/NOTES.txt +++ b/helm-charts/splunk-otel-collector/templates/NOTES.txt @@ -0,0 +1,35 @@ +{{- if eq (include "splunk-otel-collector.splunkPlatformEnabled" .) "true" }} +Splunk OpenTelemetry Connector is installed and configured to send data to Splunk Platform endpoint "{{ .Values.splunkPlatform.endpoint }}". +{{ end }} +{{- if eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true" }} +Splunk OpenTelemetry Connector is installed and configured to send data to Splunk Observability realm {{ include "splunk-otel-collector.o11yRealm" . }}. +{{ end }} + +{{- if .Values.splunkRealm }} +[WARNING] "splunkRealm" parameter is deprecated, please use "splunkObservability.realm" instead. + Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart#0353-to-0360 +{{ end }} +{{- if .Values.splunkAccessToken }} +[WARNING] "splunkAccessToken" parameter is deprecated, please use "splunkObservability.accessToken" instead. + Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart#0353-to-0360 +{{ end }} +{{- if .Values.ingestUrl }} +[WARNING] "ingestUrl" parameter is deprecated, please use "splunkObservability.ingestUrl" instead. + Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart#0353-to-0360 +{{ end }} +{{- if .Values.apiUrl }} +[WARNING] "apiUrl" parameter is deprecated, please use "splunkObservability.apiUrl" instead. + Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart#0353-to-0360 +{{ end }} +{{- if not (empty .Values.metricsEnabled) }} +[WARNING] "metricsEnabled" parameter is deprecated, please use "splunkObservability.metricsEnabled" instead. + Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart#0353-to-0360 +{{ end }} +{{- if not (empty .Values.tracesEnabled) }} +[WARNING] "tracesEnabled" parameter is deprecated, please use "splunkObservability.tracesEnabled" instead. + Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart#0353-to-0360 +{{ end }} +{{- if not (empty .Values.logsEnabled) }} +[WARNING] "logsEnabled" parameter is deprecated, please use "splunkObservability.logsEnabled" instead. + Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart#0353-to-0360 +{{ end }} diff --git a/helm-charts/splunk-otel-collector/templates/_helpers.tpl b/helm-charts/splunk-otel-collector/templates/_helpers.tpl index 98f3353382..9022a297d1 100644 --- a/helm-charts/splunk-otel-collector/templates/_helpers.tpl +++ b/helm-charts/splunk-otel-collector/templates/_helpers.tpl @@ -32,6 +32,88 @@ Create chart name and version as used by the chart label. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{/* +Whether to send data to Splunk Platform endpoint +*/}} +{{- define "splunk-otel-collector.splunkPlatformEnabled" -}} +{{- and (not (eq .Values.splunkPlatform.token "")) (not (eq .Values.splunkPlatform.endpoint "")) }} +{{- end -}} + +{{/* +Whether to send data to Splunk Observability endpoint +*/}} +{{- define "splunk-otel-collector.splunkO11yEnabled" -}} +{{- not (eq (include "splunk-otel-collector.o11yAccessToken" .) "") }} +{{- end -}} + +{{/* +Whether metrics enabled for Splunk Observability, backward compatible. +*/}} +{{- define "splunk-otel-collector.o11yMetricsEnabled" -}} +{{- if eq (toString .Values.metricsEnabled) "" }} +{{- and (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") .Values.splunkObservability.metricsEnabled }} +{{- else }} +{{- and (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") .Values.metricsEnabled }} +{{- end -}} +{{- end -}} + +{{/* +Whether traces enabled for Splunk Observability, backward compatible. +*/}} +{{- define "splunk-otel-collector.o11yTracesEnabled" -}} +{{- if eq (toString .Values.tracesEnabled) "" }} +{{- and (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") .Values.splunkObservability.tracesEnabled }} +{{- else }} +{{- and (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") .Values.tracesEnabled }} +{{- end -}} +{{- end -}} + +{{/* +Whether logs enabled for Splunk Observability, backward compatible. +*/}} +{{- define "splunk-otel-collector.o11yLogsEnabled" -}} +{{- if eq (toString .Values.logsEnabled) "" }} +{{- and (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") .Values.splunkObservability.logsEnabled }} +{{- else }} +{{- and (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") .Values.logsEnabled }} +{{- end -}} +{{- end -}} + +{{/* +Whether logs enabled for Splunk Platform. +*/}} +{{- define "splunk-otel-collector.platformLogsEnabled" -}} +{{- and (eq (include "splunk-otel-collector.splunkPlatformEnabled" .) "true") .Values.splunkObservability.logsEnabled }} +{{- end -}} + +{{/* +Whether metrics enabled for Splunk Platform. +*/}} +{{- define "splunk-otel-collector.platformMetricsEnabled" -}} +{{- and (eq (include "splunk-otel-collector.splunkPlatformEnabled" .) "true") .Values.splunkObservability.metricsEnabled }} +{{- end -}} + +{{/* +Whether metrics enabled for any destination. +*/}} +{{- define "splunk-otel-collector.metricsEnabled" -}} +{{- or (eq (include "splunk-otel-collector.o11yMetricsEnabled" .) "true") (eq (include "splunk-otel-collector.platformMetricsEnabled" .) "true") }} +{{- end -}} + +{{/* +Whether traces enabled for any destination. (currently applicable to Splunk Observability only). +*/}} +{{- define "splunk-otel-collector.tracesEnabled" -}} +{{- include "splunk-otel-collector.o11yTracesEnabled" . }} +{{- end -}} + +{{/* +Whether logs enabled for any destination. +*/}} +{{- define "splunk-otel-collector.logsEnabled" -}} +{{- or (eq (include "splunk-otel-collector.o11yLogsEnabled" .) "true") (eq (include "splunk-otel-collector.platformLogsEnabled" .) "true") }} +{{- end -}} + {{/* Create chart name and version as used by the chart label. */}} @@ -50,27 +132,35 @@ Create the name of the service account to use {{ default (include "splunk-otel-collector.fullname" .) .Values.serviceAccount.name }} {{- end -}} +{{/* +Get Splunk Observability Realm. +*/}} +{{- define "splunk-otel-collector.o11yRealm" -}} +{{- .Values.splunkObservability.realm | default .Values.splunkRealm | default "" }} +{{- end -}} + + {{/* Get Splunk ingest URL */}} -{{- define "splunk-otel-collector.ingestUrl" -}} -{{- $_ := required "splunkRealm or ingestUrl must be provided" (or .Values.ingestUrl .Values.splunkRealm) }} -{{- .Values.ingestUrl | default (printf "https://ingest.%s.signalfx.com" .Values.splunkRealm) }} +{{- define "splunk-otel-collector.o11yIngestUrl" -}} +{{- $realm := (include "splunk-otel-collector.o11yRealm" .) }} +{{- .Values.splunkObservability.ingestUrl | default .Values.ingestUrl | default (printf "https://ingest.%s.signalfx.com" $realm) }} {{- end -}} {{/* Get Splunk API URL. */}} -{{- define "splunk-otel-collector.apiUrl" -}} -{{- $_ := required "splunkRealm or apiUrl must be provided" (or .Values.apiUrl .Values.splunkRealm) }} -{{- .Values.apiUrl | default (printf "https://api.%s.signalfx.com" .Values.splunkRealm) }} +{{- define "splunk-otel-collector.o11yApiUrl" -}} +{{- $realm := (include "splunk-otel-collector.o11yRealm" .) }} +{{- .Values.splunkObservability.apiUrl | default .Values.apiUrl | default (printf "https://api.%s.signalfx.com" $realm) }} {{- end -}} {{/* -Get splunkAccessToken. +Get Splunk Observability Access Token. */}} -{{- define "splunk-otel-collector.accessToken" -}} -{{- required "splunkAccessToken value must be provided" .Values.splunkAccessToken -}} +{{- define "splunk-otel-collector.o11yAccessToken" -}} +{{- .Values.splunkObservability.accessToken | default .Values.splunkAccessToken | default "" -}} {{- end -}} {{/* diff --git a/helm-charts/splunk-otel-collector/templates/config/_common.tpl b/helm-charts/splunk-otel-collector/templates/config/_common.tpl index bdc29b8666..573e940cec 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_common.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_common.tpl @@ -15,10 +15,10 @@ memory_limiter: Common config for the otel-collector sapm exporter */}} {{- define "splunk-otel-collector.otelSapmExporter" -}} -{{- if .Values.tracesEnabled }} +{{- if (eq (include "splunk-otel-collector.tracesEnabled" .) "true") }} sapm: - endpoint: {{ include "splunk-otel-collector.ingestUrl" . }}/v2/trace - access_token: ${SPLUNK_ACCESS_TOKEN} + endpoint: {{ include "splunk-otel-collector.o11yIngestUrl" . }}/v2/trace + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} {{- end }} {{- end }} @@ -33,7 +33,7 @@ otlp: http: endpoint: 0.0.0.0:55681 -{{- if .Values.tracesEnabled }} +{{- if (eq (include "splunk-otel-collector.tracesEnabled" .) "true") }} jaeger: protocols: thrift_http: @@ -114,3 +114,59 @@ filter/logs: - key: splunk.com/exclude value: "true" {{- end }} + +{{/* +Splunk Platform Logs exporter +*/}} +{{- define "splunk-otel-collector.splunkPlatformLogsExporter" -}} +splunk_hec/platform_logs: + endpoint: {{ .Values.splunkPlatform.endpoint | quote }} + token: "${SPLUNK_PLATFORM_HEC_TOKEN}" + index: {{ .Values.splunkPlatform.index | quote }} + source: {{ .Values.splunkPlatform.source | quote }} + sourcetype: {{ .Values.splunkPlatform.sourcetype | quote }} + max_connections: {{ .Values.splunkPlatform.max_connections }} + disable_compression: {{ .Values.splunkPlatform.disable_compression }} + timeout: {{ .Values.splunkPlatform.timeout }} + insecure: {{ .Values.splunkPlatform.insecure }} + insecure_skip_verify: {{ .Values.splunkPlatform.insecure_skip_verify }} + splunk_app_name: {{ .Chart.Name }} + splunk_app_version: {{ .Chart.Version }} + {{- if .Values.splunkPlatform.clientCert }} + cert_file: /otel/etc/hec_client_cert + {{- end }} + {{- if .Values.splunkPlatform.clientKey }} + key_file: /otel/etc/hec_client_key + {{- end }} + {{- if .Values.splunkPlatform.caFile }} + ca_file: /otel/etc/hec_ca_file + {{- end }} +{{- end }} + +{{/* +Splunk Platform Logs exporter +*/}} +{{- define "splunk-otel-collector.splunkPlatformMetricsExporter" -}} +splunk_hec/platform_metrics: + endpoint: {{ .Values.splunkPlatform.endpoint | quote }} + token: "${SPLUNK_PLATFORM_HEC_TOKEN}" + index: {{ .Values.splunkPlatform.metrics_index | quote }} + source: {{ .Values.splunkPlatform.source | quote }} + sourcetype: {{ .Values.splunkPlatform.sourcetype | quote }} + max_connections: {{ .Values.splunkPlatform.max_connections }} + disable_compression: {{ .Values.splunkPlatform.disable_compression }} + timeout: {{ .Values.splunkPlatform.timeout }} + insecure: {{ .Values.splunkPlatform.insecure }} + insecure_skip_verify: {{ .Values.splunkPlatform.insecure_skip_verify }} + splunk_app_name: {{ .Chart.Name }} + splunk_app_version: {{ .Chart.Version }} + {{- if .Values.splunkPlatform.clientCert }} + cert_file: /otel/etc/hec_client_cert + {{- end }} + {{- if .Values.splunkPlatform.clientKey }} + key_file: /otel/etc/hec_client_key + {{- end }} + {{- if .Values.splunkPlatform.caFile }} + ca_file: /otel/etc/hec_ca_file + {{- end }} +{{- end }} diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl index 5a74f161ce..6f3ae25333 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl @@ -4,7 +4,7 @@ The values can be overridden in .Values.otelAgent.config */}} {{- define "splunk-otel-collector.otelAgentConfig" -}} extensions: - {{- if .Values.logsCollection.enabled}} + {{- if and (eq (include "splunk-otel-collector.logsEnabled" .) "true") .Values.logsCollection.enabled }} file_storage: directory: {{ .Values.logsCollection.checkpointPath }} {{- end }} @@ -19,7 +19,7 @@ extensions: receivers: {{- include "splunk-otel-collector.otelTraceReceivers" . | nindent 2 }} - {{- if .Values.logsEnabled }} + {{- if (eq (include "splunk-otel-collector.logsEnabled" .) "true") }} fluentforward: endpoint: 0.0.0.0:8006 {{- end }} @@ -36,7 +36,7 @@ receivers: # Fluend metrics collection disabled by default # - "${K8S_POD_IP}:24231" - {{- if .Values.metricsEnabled }} + {{- if (eq (include "splunk-otel-collector.metricsEnabled" .) "true") }} hostmetrics: collection_interval: 10s scrapers: @@ -93,7 +93,7 @@ receivers: endpoint: 0.0.0.0:9943 {{- end }} - {{- if .Values.tracesEnabled }} + {{- if (eq (include "splunk-otel-collector.o11yTracesEnabled" .) "true") }} smartagent/signalfx-forwarder: type: signalfx-forwarder listenAddress: 0.0.0.0:9080 @@ -304,9 +304,11 @@ processors: - action: insert key: k8s.node.name value: "${K8S_NODE_NAME}" + {{- with .Values.clusterName }} - action: insert key: k8s.cluster.name - value: "{{ .Values.clusterName }}" + value: "{{ . }}" + {{- end }} {{- range .Values.extraAttributes.custom }} - action: insert key: "{{ .name }}" @@ -353,30 +355,40 @@ exporters: endpoint: {{ include "splunk-otel-collector.fullname" . }}:4317 insecure: true {{- else }} - # If collector is disabled, metrics, logs and traces will be sent to to SignalFx backend + # If collector is disabled, data will be sent to directly to backends. + {{- if (eq (include "splunk-otel-collector.o11yTracesEnabled" .) "true") }} {{- include "splunk-otel-collector.otelSapmExporter" . | nindent 2 }} - {{- if .Values.logsEnabled }} - splunk_hec: - endpoint: {{ include "splunk-otel-collector.ingestUrl" . }}/v1/log - token: "${SPLUNK_ACCESS_TOKEN}" + {{- end }} + {{- if (eq (include "splunk-otel-collector.o11yLogsEnabled" .) "true") }} + splunk_hec/o11y: + endpoint: {{ include "splunk-otel-collector.o11yIngestUrl" . }}/v1/log + token: "${SPLUNK_O11Y_ACCESS_TOKEN}" + {{- end }} + {{- if (eq (include "splunk-otel-collector.platformLogsEnabled" .) "true") }} + {{- include "splunk-otel-collector.splunkPlatformLogsExporter" . | nindent 2 }} + {{- end }} + {{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" .) "true") }} + {{- include "splunk-otel-collector.splunkPlatformMetricsExporter" . | nindent 2 }} {{- end }} {{- end }} + {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} signalfx: correlation: {{- if .Values.otelCollector.enabled }} ingest_url: http://{{ include "splunk-otel-collector.fullname" . }}:9943 api_url: http://{{ include "splunk-otel-collector.fullname" . }}:6060 {{- else }} - ingest_url: {{ include "splunk-otel-collector.ingestUrl" . }} - api_url: {{ include "splunk-otel-collector.apiUrl" . }} + ingest_url: {{ include "splunk-otel-collector.o11yIngestUrl" . }} + api_url: {{ include "splunk-otel-collector.o11yApiUrl" . }} {{- end }} - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} sync_host_metadata: true + {{- end }} service: extensions: - {{- if .Values.logsCollection.enabled }} + {{- if and (eq (include "splunk-otel-collector.logsEnabled" .) "true") .Values.logsCollection.enabled }} - file_storage {{- end }} - health_check @@ -388,7 +400,7 @@ service: # The default pipelines should to be changed. You can add any custom pipeline instead. # In order to disable a default pipeline just set it to `null` in otelAgent.config overrides. pipelines: - {{- if .Values.logsEnabled }} + {{- if (eq (include "splunk-otel-collector.logsEnabled" .) "true") }} logs: receivers: {{- if and .Values.logsCollection.enabled .Values.logsCollection.containers.enabled }} @@ -414,11 +426,16 @@ service: {{- if .Values.otelCollector.enabled }} - otlp {{- else }} - - splunk_hec + {{- if (eq (include "splunk-otel-collector.o11yLogsEnabled" .) "true") }} + - splunk_hec/o11y + {{- end }} + {{- if (eq (include "splunk-otel-collector.platformLogsEnabled" .) "true") }} + - splunk_hec/platform_logs + {{- end }} {{- end }} {{- end }} - {{- if .Values.tracesEnabled }} + {{- if (eq (include "splunk-otel-collector.tracesEnabled" .) "true") }} # Default traces pipeline. traces: receivers: [otlp, jaeger, smartagent/signalfx-forwarder, zipkin] @@ -437,13 +454,13 @@ service: {{- else }} - sapm {{- end }} - {{- if .Values.metricsEnabled }} + {{- if (eq (include "splunk-otel-collector.o11yMetricsEnabled" $) "true") }} # For trace/metric correlation. - signalfx {{- end }} {{- end }} - {{- if .Values.metricsEnabled }} + {{- if (eq (include "splunk-otel-collector.metricsEnabled" .) "true") }} # Default metrics pipeline. metrics: receivers: [hostmetrics, kubeletstats, receiver_creator, signalfx] @@ -459,10 +476,16 @@ service: {{- if .Values.otelCollector.enabled }} - otlp {{- else }} + {{- if (eq (include "splunk-otel-collector.o11yMetricsEnabled" .) "true") }} - signalfx {{- end }} + {{- if (eq (include "splunk-otel-collector.platformLogsEnabled" .) "true") }} + - splunk_hec/platform_metrics + {{- end }} + {{- end }} {{- end }} + {{- if or (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") (eq (include "splunk-otel-collector.platformMetricsEnabled" .) "true") }} # Pipeline for metrics collected about the agent pod itself. metrics/agent: receivers: [prometheus/agent] @@ -473,7 +496,17 @@ service: - resource/add_agent_k8s - resourcedetection exporters: + {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} # Use signalfx instead of otlp even if collector is enabled # in order to sync host metadata. - signalfx + {{- end }} + {{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" .) "true") }} + {{- if .Values.otelCollector.enabled }} + - otlp + {{- else }} + - splunk_hec/platform_metrics + {{- end }} + {{- end }} + {{- end }} {{- end }} diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-collector.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-collector.tpl index 5cdcc71520..43b284fd12 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-collector.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-collector.tpl @@ -6,9 +6,11 @@ The values can be overridden in .Values.otelCollector.config extensions: health_check: + {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} http_forwarder: egress: - endpoint: {{ include "splunk-otel-collector.apiUrl" . }} + endpoint: {{ include "splunk-otel-collector.o11yApiUrl" . }} + {{- end }} zpages: @@ -86,16 +88,23 @@ processors: key: k8s.namespace.name value: "${K8S_NAMESPACE}" + {{ if or .Values.clusterName }} resource/add_cluster_name: attributes: - action: upsert value: {{ .Values.clusterName }} key: k8s.cluster.name + {{- end }} + + {{- if .Values.extraAttributes.custom }} + resource/add_custom_attrs: + attributes: {{- range .Values.extraAttributes.custom }} - action: upsert value: {{ .value }} key: {{ .name }} {{- end }} + {{- end }} {{- if .Values.environment }} resource/add_environment: @@ -106,24 +115,43 @@ processors: {{- end }} exporters: + {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} + signalfx: + ingest_url: {{ include "splunk-otel-collector.o11yIngestUrl" . }} + api_url: {{ include "splunk-otel-collector.o11yApiUrl" . }} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} + {{- end }} + + {{- if (eq (include "splunk-otel-collector.o11yTracesEnabled" .) "true") }} {{- include "splunk-otel-collector.otelSapmExporter" . | nindent 2 }} - {{- if .Values.logsEnabled }} - splunk_hec: - endpoint: {{ include "splunk-otel-collector.ingestUrl" . }}/v1/log - token: "${SPLUNK_ACCESS_TOKEN}" {{- end }} - signalfx: - ingest_url: {{ include "splunk-otel-collector.ingestUrl" . }} - api_url: {{ include "splunk-otel-collector.apiUrl" . }} - access_token: ${SPLUNK_ACCESS_TOKEN} + + {{- if (eq (include "splunk-otel-collector.o11yLogsEnabled" .) "true") }} + splunk_hec/o11y: + endpoint: {{ include "splunk-otel-collector.o11yIngestUrl" . }}/v1/log + token: "${SPLUNK_O11Y_ACCESS_TOKEN}" + {{- end }} + + {{- if (eq (include "splunk-otel-collector.platformLogsEnabled" .) "true") }} + {{- include "splunk-otel-collector.splunkPlatformLogsExporter" . | nindent 2 }} + {{- end }} + + {{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" .) "true") }} + {{- include "splunk-otel-collector.splunkPlatformMetricsExporter" . | nindent 2 }} + {{- end }} service: - extensions: [health_check, http_forwarder, zpages] + extensions: + - health_check + - zpages + {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} + - http_forwarder + {{- end }} # The default pipelines should not need to be changed. You can add any custom pipeline instead. # In order to disable a default pipeline just set it to `null` in otelCollector.config overrides. pipelines: - {{- if .Values.tracesEnabled }} + {{- if (eq (include "splunk-otel-collector.o11yTracesEnabled" $) "true") }} # default traces pipeline traces: receivers: [otlp, jaeger, zipkin] @@ -131,26 +159,49 @@ service: - memory_limiter - batch - k8s_tagger + {{- if .Values.clusterName }} - resource/add_cluster_name + {{- end }} + {{- if .Values.extraAttributes.custom }} + - resource/add_custom_attrs + {{- end }} {{- if .Values.environment }} - resource/add_environment {{- end }} exporters: [sapm] {{- end }} + {{- if (eq (include "splunk-otel-collector.metricsEnabled" .) "true") }} # default metrics pipeline metrics: receivers: [otlp, signalfx] - processors: [memory_limiter, batch, resource/add_cluster_name] - exporters: [signalfx] + processors: + - memory_limiter + - batch + {{- if .Values.clusterName }} + - resource/add_cluster_name + {{- end }} + {{- if .Values.extraAttributes.custom }} + - resource/add_custom_attrs + {{- end }} + exporters: + {{- if (eq (include "splunk-otel-collector.o11yMetricsEnabled" .) "true") }} + - signalfx + {{- end }} + {{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" .) "true") }} + - splunk_hec/platform_metrics + {{- end }} + {{- end }} + {{- if (eq (include "splunk-otel-collector.o11yMetricsEnabled" .) "true") }} # logs pipeline for receiving and exporting SignalFx events logs/signalfx-events: receivers: [signalfx] processors: [memory_limiter, batch] exporters: [signalfx] + {{- end }} - {{- if .Values.logsEnabled }} + {{- if (eq (include "splunk-otel-collector.logsEnabled" .) "true") }} # default logs pipeline logs: receivers: [otlp] @@ -160,17 +211,33 @@ service: - batch - filter/logs - resource/logs - exporters: [splunk_hec] + exporters: + {{- if (eq (include "splunk-otel-collector.o11yLogsEnabled" .) "true") }} + - splunk_hec/o11y + {{- end }} + {{- if (eq (include "splunk-otel-collector.platformLogsEnabled" .) "true") }} + - splunk_hec/platform_logs + {{- end }} {{- end }} + {{- if or (eq (include "splunk-otel-collector.splunkO11yEnabled" $) "true") (eq (include "splunk-otel-collector.platformMetricsEnabled" $) "true") }} # Pipeline for metrics collected about the collector pod itself. metrics/collector: receivers: [prometheus/collector] processors: - memory_limiter - batch + {{- if .Values.clusterName }} - resource/add_cluster_name + {{- end }} - resource/add_collector_k8s - resourcedetection - exporters: [signalfx] + exporters: + {{- if (eq (include "splunk-otel-collector.o11yMetricsEnabled" .) "true") }} + - signalfx + {{- end }} + {{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" $) "true") }} + - splunk_hec/platform_metrics + {{- end }} + {{- end }} {{- end }} 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 5d724b97f2..7cecd9fb55 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 @@ -17,7 +17,9 @@ receivers: - targets: ["${K8S_POD_IP}:8889"] k8s_cluster: auth_type: serviceAccount + {{- if eq (include "splunk-otel-collector.o11yMetricsEnabled" $) "true" }} metadata_exporters: [signalfx] + {{- end }} {{- if eq .Values.distro "openshift" }} distribution: openshift {{- end }} @@ -71,9 +73,11 @@ processors: - action: insert key: receiver value: k8scluster + {{- with .Values.clusterName }} - action: upsert key: k8s.cluster.name - value: {{ .Values.clusterName }} + value: {{ . }} + {{- end }} {{- range .Values.extraAttributes.custom }} - action: upsert key: {{ .name }} @@ -81,25 +85,31 @@ processors: {{- end }} exporters: + {{- if eq (include "splunk-otel-collector.o11yMetricsEnabled" $) "true" }} signalfx: {{- if .Values.otelCollector.enabled }} ingest_url: http://{{ include "splunk-otel-collector.fullname" . }}:9943 api_url: http://{{ include "splunk-otel-collector.fullname" . }}:6060 {{- else }} - ingest_url: {{ include "splunk-otel-collector.ingestUrl" . }} - api_url: {{ include "splunk-otel-collector.apiUrl" . }} + ingest_url: {{ include "splunk-otel-collector.o11yIngestUrl" . }} + api_url: {{ include "splunk-otel-collector.o11yApiUrl" . }} {{- end }} - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} timeout: 10s + {{- end }} - {{- if and .Values.logsEnabled .Values.otelK8sClusterReceiver.k8sEventsEnabled }} - splunk_hec: - endpoint: {{ include "splunk-otel-collector.ingestUrl" . }}/v1/log - token: "${SPLUNK_ACCESS_TOKEN}" + {{- if and (eq (include "splunk-otel-collector.logsEnabled" $) "true") .Values.otelK8sClusterReceiver.k8sEventsEnabled }} + splunk_hec/o11y: + endpoint: {{ include "splunk-otel-collector.o11yIngestUrl" . }}/v1/log + token: "${SPLUNK_O11Y_ACCESS_TOKEN}" sourcetype: kube:events source: kubelet {{- end }} + {{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" .) "true") }} + {{- include "splunk-otel-collector.splunkPlatformMetricsExporter" . | nindent 2 }} + {{- end }} + service: extensions: [health_check] pipelines: @@ -107,8 +117,15 @@ service: metrics: receivers: [k8s_cluster] processors: [memory_limiter, batch, resource] - exporters: [signalfx] + exporters: + {{- if (eq (include "splunk-otel-collector.o11yMetricsEnabled" .) "true") }} + - signalfx + {{- end }} + {{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" $) "true") }} + - splunk_hec/platform_metrics + {{- end }} + {{- if or (eq (include "splunk-otel-collector.splunkO11yEnabled" $) "true") (eq (include "splunk-otel-collector.platformMetricsEnabled" $) "true") }} # Pipeline for metrics collected about the collector pod itself. metrics/collector: receivers: [prometheus/k8s_cluster_receiver] @@ -118,8 +135,16 @@ service: - resource - resource/add_collector_k8s - resourcedetection - exporters: [signalfx] - {{- if .Values.otelK8sClusterReceiver.k8sEventsEnabled }} + exporters: + {{- if (eq (include "splunk-otel-collector.o11yMetricsEnabled" .) "true") }} + - signalfx + {{- end }} + {{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" $) "true") }} + - splunk_hec/platform_metrics + {{- end }} + {{- end }} + + {{- if and .Values.otelK8sClusterReceiver.k8sEventsEnabled (eq (include "splunk-otel-collector.o11yMetricsEnabled" .) "true") }} logs/events: receivers: - smartagent/kubernetes-events @@ -129,8 +154,8 @@ service: - resource exporters: - signalfx - {{- if .Values.logsEnabled }} - - splunk_hec + {{- if (eq (include "splunk-otel-collector.o11yLogsEnabled" .) "true") }} + - splunk_hec/o11y {{- end }} {{- end }} {{- end }} diff --git a/helm-charts/splunk-otel-collector/templates/configmap-fluentd-cri.yaml b/helm-charts/splunk-otel-collector/templates/configmap-fluentd-cri.yaml index cf904065aa..18aa04c772 100644 --- a/helm-charts/splunk-otel-collector/templates/configmap-fluentd-cri.yaml +++ b/helm-charts/splunk-otel-collector/templates/configmap-fluentd-cri.yaml @@ -1,4 +1,4 @@ -{{ if and .Values.logsEnabled .Values.otelAgent.enabled .Values.fluentd.enabled }} +{{ if and (eq (include "splunk-otel-collector.logsEnabled" .) "true") .Values.otelAgent.enabled .Values.fluentd.enabled }} {{/* Fluentd config parts applied only to clusters with containerd/cri-o runtime. */}} diff --git a/helm-charts/splunk-otel-collector/templates/configmap-fluentd-json.yaml b/helm-charts/splunk-otel-collector/templates/configmap-fluentd-json.yaml index 9a16b189ac..1565e7d291 100644 --- a/helm-charts/splunk-otel-collector/templates/configmap-fluentd-json.yaml +++ b/helm-charts/splunk-otel-collector/templates/configmap-fluentd-json.yaml @@ -1,4 +1,4 @@ -{{ if and .Values.logsEnabled .Values.otelAgent.enabled .Values.fluentd.enabled }} +{{ if and (eq (include "splunk-otel-collector.logsEnabled" .) "true") .Values.otelAgent.enabled .Values.fluentd.enabled }} {{/* Fluentd config parts applied only to clusters with docker runtime. */}} diff --git a/helm-charts/splunk-otel-collector/templates/configmap-fluentd.yaml b/helm-charts/splunk-otel-collector/templates/configmap-fluentd.yaml index 7758d8ccf7..549cd95ff3 100644 --- a/helm-charts/splunk-otel-collector/templates/configmap-fluentd.yaml +++ b/helm-charts/splunk-otel-collector/templates/configmap-fluentd.yaml @@ -1,4 +1,4 @@ -{{ if and .Values.logsEnabled .Values.otelAgent.enabled .Values.fluentd.enabled }} +{{ if and (eq (include "splunk-otel-collector.logsEnabled" .) "true") .Values.otelAgent.enabled .Values.fluentd.enabled }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/helm-charts/splunk-otel-collector/templates/configmap-otel-k8s-cluster-receiver.yaml b/helm-charts/splunk-otel-collector/templates/configmap-otel-k8s-cluster-receiver.yaml index 043cbcbb95..3660715d88 100644 --- a/helm-charts/splunk-otel-collector/templates/configmap-otel-k8s-cluster-receiver.yaml +++ b/helm-charts/splunk-otel-collector/templates/configmap-otel-k8s-cluster-receiver.yaml @@ -1,4 +1,4 @@ -{{ if and .Values.otelK8sClusterReceiver.enabled .Values.metricsEnabled }} +{{ if and .Values.otelK8sClusterReceiver.enabled (eq (include "splunk-otel-collector.metricsEnabled" .) "true") }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/helm-charts/splunk-otel-collector/templates/daemonset.yaml b/helm-charts/splunk-otel-collector/templates/daemonset.yaml index aa73536b3a..f06848ab63 100644 --- a/helm-charts/splunk-otel-collector/templates/daemonset.yaml +++ b/helm-charts/splunk-otel-collector/templates/daemonset.yaml @@ -8,7 +8,7 @@ metadata: chart: {{ template "splunk-otel-collector.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} - {{- if and .Values.logsEnabled .Values.fluentd.enabled }} + {{- if and (eq (include "splunk-otel-collector.logsEnabled" .) "true") .Values.fluentd.enabled }} engine: fluentd {{- end }} {{- if .Values.otelAgent.annotations }} @@ -58,7 +58,7 @@ spec: tolerations: {{ toYaml . | nindent 8 }} {{- end }} - {{- if and .Values.logsEnabled .Values.fluentd.enabled }} + {{- if and (eq (include "splunk-otel-collector.logsEnabled" .) "true") .Values.fluentd.enabled }} initContainers: - name: prepare-fluentd-config image: {{ .Values.image.fluentd.initContainer.image }} @@ -90,7 +90,7 @@ spec: mountPath: /fluentd/etc/cri {{- end }} containers: - {{- if and .Values.logsEnabled .Values.fluentd.enabled }} + {{- if and (eq (include "splunk-otel-collector.logsEnabled" .) "true") .Values.fluentd.enabled }} - name: fluentd image: {{ template "splunk-otel-collector.image.fluentd" . }} imagePullPolicy: {{ .Values.image.fluentd.pullPolicy }} @@ -150,7 +150,7 @@ spec: {{- end }} ports: {{- range $key, $port := .Values.otelAgent.ports }} - {{- if eq true (and $.Values.metricsEnabled (has "metrics" $port.enabled_for)) (and $.Values.tracesEnabled (has "traces" $port.enabled_for)) (and $.Values.logsEnabled (has "logs" $port.enabled_for)) }} + {{- if eq true (and (eq (include "splunk-otel-collector.metricsEnabled" $) "true") (has "metrics" $port.enabled_for)) (and (eq (include "splunk-otel-collector.o11yTracesEnabled" $) "true") (has "traces" $port.enabled_for)) (and (eq (include "splunk-otel-collector.logsEnabled" $) "true") (has "logs" $port.enabled_for)) }} - name: {{ $key }} {{- omit $port "enabled_for" | toYaml | trim | nindent 10 }} {{- end }} @@ -188,12 +188,21 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: {{ include "splunk-otel-collector.secret" . }} - key: splunk_access_token - {{- if .Values.metricsEnabled }} + key: splunk_o11y_access_token + {{- end }} + {{- if (eq (include "splunk-otel-collector.splunkPlatformEnabled" .) "true") }} + - name: SPLUNK_PLATFORM_HEC_TOKEN + valueFrom: + secretKeyRef: + name: {{ include "splunk-otel-collector.secret" . }} + key: splunk_platform_hec_token + {{- end }} + {{- if eq (include "splunk-otel-collector.metricsEnabled" .) "true" }} # Env variables for host metrics receiver - name: HOST_PROC value: {{ .Values.isWindows | ternary "C:\\hostfs\\proc" "/hostfs/proc" }} @@ -231,13 +240,13 @@ spec: volumeMounts: - mountPath: {{ .Values.isWindows | ternary "C:\\conf" "/conf" }} name: otel-configmap - {{- if .Values.metricsEnabled }} + {{- if eq (include "splunk-otel-collector.metricsEnabled" $) "true" }} - mountPath: {{ .Values.isWindows | ternary "C:\\hostfs" "/hostfs" }} name: hostfs readOnly: true mountPropagation: HostToContainer {{- end }} - {{- if and .Values.logsEnabled .Values.logsCollection.enabled }} + {{- if and (eq (include "splunk-otel-collector.logsEnabled" $) "true") .Values.logsCollection.enabled }} - name: varlog mountPath: /var/log readOnly: true @@ -252,7 +261,7 @@ spec: {{- end }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} volumes: - {{- if .Values.logsEnabled }} + {{- if (eq (include "splunk-otel-collector.logsEnabled" .) "true") }} {{- if .Values.fluentd.enabled }} - name: varlog hostPath: @@ -291,7 +300,7 @@ spec: type: DirectoryOrCreate {{- end}} {{- end}} - {{- if .Values.metricsEnabled }} + {{- if eq (include "splunk-otel-collector.metricsEnabled" $) "true" }} - name: hostfs hostPath: path: {{ .Values.isWindows | ternary "C:\\" "/" }} diff --git a/helm-charts/splunk-otel-collector/templates/deployment-collector.yaml b/helm-charts/splunk-otel-collector/templates/deployment-collector.yaml index 38b41dcb23..724d5d9d94 100644 --- a/helm-charts/splunk-otel-collector/templates/deployment-collector.yaml +++ b/helm-charts/splunk-otel-collector/templates/deployment-collector.yaml @@ -99,17 +99,26 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: {{ include "splunk-otel-collector.secret" . }} - key: splunk_access_token + key: splunk_o11y_access_token + {{- end }} + {{- if (eq (include "splunk-otel-collector.splunkPlatformEnabled" .) "true") }} + - name: SPLUNK_PLATFORM_HEC_TOKEN + valueFrom: + secretKeyRef: + name: {{ include "splunk-otel-collector.secret" . }} + key: splunk_platform_hec_token + {{- end }} {{- with .Values.otelCollector.extraEnvs }} {{- . | toYaml | nindent 10 }} {{- end }} ports: {{- range $key, $port := .Values.otelCollector.ports }} - {{- if eq true (and $.Values.metricsEnabled (has "metrics" $port.enabled_for)) (and $.Values.tracesEnabled (has "traces" $port.enabled_for)) (and $.Values.logsEnabled (has "logs" $port.enabled_for)) }} + {{- if eq true (and (eq (include "splunk-otel-collector.metricsEnabled" $) "true") (has "metrics" $port.enabled_for)) (and (eq (include "splunk-otel-collector.tracesEnabled" $) "true") (has "traces" $port.enabled_for)) (and (eq (include "splunk-otel-collector.logsEnabled" $) "true") (has "logs" $port.enabled_for)) }} - name: {{ $key }} {{- omit $port "enabled_for" | toYaml | trim | nindent 10 }} {{- end }} diff --git a/helm-charts/splunk-otel-collector/templates/deployment-k8s-cluster-receiver.yaml b/helm-charts/splunk-otel-collector/templates/deployment-k8s-cluster-receiver.yaml index e2ab17bd64..a526afa6d0 100644 --- a/helm-charts/splunk-otel-collector/templates/deployment-k8s-cluster-receiver.yaml +++ b/helm-charts/splunk-otel-collector/templates/deployment-k8s-cluster-receiver.yaml @@ -1,4 +1,4 @@ -{{ if and .Values.otelK8sClusterReceiver.enabled .Values.metricsEnabled }} +{{ if and .Values.otelK8sClusterReceiver.enabled (eq (include "splunk-otel-collector.metricsEnabled" .) "true") }} apiVersion: apps/v1 kind: Deployment metadata: @@ -99,11 +99,20 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: {{ include "splunk-otel-collector.secret" . }} - key: splunk_access_token + key: splunk_o11y_access_token + {{- end }} + {{- if (eq (include "splunk-otel-collector.splunkPlatformEnabled" .) "true") }} + - name: SPLUNK_PLATFORM_HEC_TOKEN + valueFrom: + secretKeyRef: + name: {{ include "splunk-otel-collector.secret" . }} + key: splunk_platform_hec_token + {{- end }} {{- with .Values.otelK8sClusterReceiver.extraEnvs }} {{- . | toYaml | nindent 10 }} {{- end }} diff --git a/helm-charts/splunk-otel-collector/templates/pdb-k8s-cluster-receiver.yaml b/helm-charts/splunk-otel-collector/templates/pdb-k8s-cluster-receiver.yaml index 057ebf2828..5f7f14b570 100644 --- a/helm-charts/splunk-otel-collector/templates/pdb-k8s-cluster-receiver.yaml +++ b/helm-charts/splunk-otel-collector/templates/pdb-k8s-cluster-receiver.yaml @@ -1,4 +1,4 @@ -{{- if and (and .Values.otelK8sClusterReceiver.enabled .Values.metricsEnabled) .Values.podDisruptionBudget }} +{{- if and (and .Values.otelK8sClusterReceiver.enabled (eq (include "splunk-otel-collector.metricsEnabled" $) "true")) .Values.podDisruptionBudget }} apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: diff --git a/helm-charts/splunk-otel-collector/templates/secret.yaml b/helm-charts/splunk-otel-collector/templates/secret.yaml index ef7daef5f3..ecd245f447 100644 --- a/helm-charts/splunk-otel-collector/templates/secret.yaml +++ b/helm-charts/splunk-otel-collector/templates/secret.yaml @@ -10,5 +10,19 @@ metadata: heritage: {{ .Release.Service }} type: Opaque data: - splunk_access_token: {{ include "splunk-otel-collector.accessToken" . | b64enc }} + {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} + splunk_o11y_access_token: {{ include "splunk-otel-collector.o11yAccessToken" . | b64enc }} + {{- end }} + {{- if (eq (include "splunk-otel-collector.splunkPlatformEnabled" .) "true") }} + splunk_platform_hec_token: {{ .Values.splunkPlatform.token | b64enc }} + {{- end }} + {{- with .Values.splunkPlatform.clientCert }} + hec_client_cert: {{ . | b64enc }} + {{- end }} + {{- with .Values.splunkPlatform.clientKey }} + hec_client_key: {{ . | b64enc }} + {{- end }} + {{- with .Values.splunkPlatform.caFile }} + hec_ca_file: {{ . | b64enc }} + {{- end }} {{- end -}} diff --git a/helm-charts/splunk-otel-collector/templates/service.yaml b/helm-charts/splunk-otel-collector/templates/service.yaml index 0e3457456c..6f2488d3eb 100644 --- a/helm-charts/splunk-otel-collector/templates/service.yaml +++ b/helm-charts/splunk-otel-collector/templates/service.yaml @@ -17,7 +17,7 @@ spec: type: {{ .Values.service.type }} ports: {{- range $key, $port := .Values.otelCollector.ports }} - {{- if eq true (and $.Values.metricsEnabled (has "metrics" $port.enabled_for)) (and $.Values.tracesEnabled (has "traces" $port.enabled_for)) (and $.Values.logsEnabled (has "logs" $port.enabled_for)) }} + {{- if eq true (and (eq (include "splunk-otel-collector.metricsEnabled" $) "true") (has "metrics" $port.enabled_for)) (and (eq (include "splunk-otel-collector.tracesEnabled" $) "true") (has "traces" $port.enabled_for)) (and (eq (include "splunk-otel-collector.logsEnabled" $) "true") (has "logs" $port.enabled_for)) }} - name: {{ $key }} port: {{ $port.containerPort }} targetPort: {{ $key }} diff --git a/helm-charts/splunk-otel-collector/values.schema.json b/helm-charts/splunk-otel-collector/values.schema.json index 47a38ea280..42489e74ae 100644 --- a/helm-charts/splunk-otel-collector/values.schema.json +++ b/helm-charts/splunk-otel-collector/values.schema.json @@ -4,16 +4,12 @@ "required": [ "clusterName", "provider", - "distro", - "tracesEnabled", - "metricsEnabled", - "logsEnabled" + "distro" ], "title": "Values", "properties": { "clusterName": { "description": "Cluster name that will be used as metadata attributes for all telemetry data", - "minLength": 1, "type": "string" }, "provider": { @@ -26,22 +22,35 @@ "type": "string", "enum": ["eks", "gke", "aks", "openshift", " ", ""] }, - "metricsEnabled": { - "description": "Metrics telemetry enabled", - "type": "boolean" + "splunkPlatform": { + "description": "Splunk Data-to-Everything Platform configuration", + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "token": { + "type": "string" + } + } }, - "tracesEnabled": { - "description": "Traces telemetry enabled", - "type": "boolean" - }, - "logsEnabled": { - "description": "Logs telemetry enabled", - "type": "boolean" + "splunkObservability": { + "description": "Splunk Observability configuration", + "type": "object", + "properties": { + "realm": { + "type": "string" + }, + "accessToken": { + "type": "string" + }, + "ingestUrl": { + "type": "string" + }, + "apiUrl": { + "type": "string" + } + } } - }, - "anyOf": [ - {"properties": {"metricsEnabled": {"const": true}}}, - {"properties": {"tracesEnabled": {"const": true}}}, - {"properties": {"logsEnabled": {"const": true}}} - ] + } } diff --git a/helm-charts/splunk-otel-collector/values.yaml b/helm-charts/splunk-otel-collector/values.yaml index ee6d57eaa5..3103750fca 100644 --- a/helm-charts/splunk-otel-collector/values.yaml +++ b/helm-charts/splunk-otel-collector/values.yaml @@ -3,31 +3,86 @@ # Declared variables will be passed into templates. ################################################################################ -# clusterName is a REQUIRED field. It can be set to an arbitrary value -# that identifies this K8s cluster in SignalFx. The value will be associated -# with every trace, metric and log as "k8s.cluster.name" metadata attribute. -################################################################################ - -clusterName: k8s-cluster - - -################################################################################ -# Splunk SignalFx backend configuration -################################################################################ - -# The SignalFx realm to send telemetry data to. If set, the values of `ingestUrl` -# and `apiUrl` will be automatically set based on this -# realm value. If not set, it defaults to the original "us0" realm. -splunkRealm: us0 - -# (REQUIRED) SignalFx org access token. -splunkAccessToken: - -# SignalFx ingest URL, default: "https://ingest..signalfx.com". -ingestUrl: - -# The SignalFx API URL, default: "https://api..signalfx.com". -apiUrl: +# clusterName is a REQUIRED field for Spunk Observability. It can be set to an +# arbitrary value that identifies this K8s cluster in SignalFx. The value will +# be associated with every trace, metric and log as "k8s.cluster.name" metadata +# attribute. +################################################################################ + +clusterName: "" + +################################################################################ +# Splunk Data-to-Everything Platform configuration. +################################################################################ + +# Specify `endpoint` and `token` in order to send data to Splunk Cloud or Splunk +# Enterprise. +splunkPlatform: + # Required for Splunk Enterprise/Cloud. URL to a Splunk instance to send data to. + # e.g. "http://X.X.X.X:8088/services/collector" + endpoint: "" + # Required for Splunk Enterprise/Cloud. Splunk HTTP Event Collector token. + token: "" + + # Optional. Name of the Splunk index targeted. + index: "" + metrics_index: + # Optional. Default value for `source` field. + source: "kubernetes" + # Optional. Default value for `sourcetype` field. For container logs, it will + # be container name. + sourcetype: + # Maximum HTTP connections to use simultaneously when sending data. + max_connections: 200 + # Whether to disable gzip compression over HTTP. Defaults to true. + disable_compression: true + # HTTP timeout when sending data. Defaults to 10s. + timeout: 10s + # Whether to skip checking the certificate of the HEC endpoint when sending + # data over HTTPS. + insecure_skip_verify: false + # The PEM-format CA certificate for this client. + # NOTE: The content of the certificate itself should be used here, not the + # file path. The certificate will be stored as a secret in kubernetes. + clientCert: "" + # The private key for this client. + # NOTE: The content of the key itself should be used here, not the file path. + # The key will be stored as a secret in kubernetes. + clientKey: "" + # The PEM-format CA certificate file. + # NOTE: The content of the file itself should be used here, not the file path. + # The file will be stored as a secret in kubernetes. + caFile: "" + + # Options to disable particular telemetry data types that will be sent to + # Splunk Platform. + logsEnabled: true + metricsEnabled: true + +################################################################################ +# Splunk Observability configuration +################################################################################ + +# Specify `realm` and `accessToken` to telemetry data to Splunk Observability +# Cloud. +splunkObservability: + # Required for Splunk Observability. Splunk Observability realm to send + # telemetry data to. + realm: us0 + # Required for Splunk Observability. Splunk Observability org access token. + accessToken: "" + + # Optional. Splunk Observability ingest URL, default: + # "https://ingest..signalfx.com". + ingestUrl: "" + # Optional. Splunk Observability API URL, default: + # "https://api..signalfx.com". + apiUrl: "" + + # Options to disable particular telemetry data types. + logsEnabled: true + metricsEnabled: true + tracesEnabled: true ################################################################################ # Cloud provider, if any, the collector is running on. Leave empty for none/other. @@ -48,16 +103,6 @@ provider: "" distro: "" -################################################################################ -# Telemetry configuration. -# By default metrics, traces and logs are collected from the k8s cluster. -# It's possible to disable any kind of telemetry, if it's not needed. -################################################################################ - -metricsEnabled: true -tracesEnabled: true -logsEnabled: true - ################################################################################ # Optional "environment" parameter that will be added to all the telemetry # data (traces/logs/metrics) as an attribute. It will allow Splunk Observability diff --git a/rendered/README.md b/rendered/README.md index 9802f5424f..ca95efea85 100644 --- a/rendered/README.md +++ b/rendered/README.md @@ -1,6 +1,8 @@ # Manifests -The [manifests](manifests) directory contains pre-rendered Kubernetes resource manifests that can be applied with `kubectl create`. Different sets contain different features enabled +The [manifests](manifests) directory contains pre-rendered Kubernetes resource +manifests that can be applied with `kubectl create`. Different sets contain +different features enabled. For now, configured for Slunk Observability only. - [metrics-only](manifests/metrics-only) - [traces-only](manifests/traces-only) diff --git a/rendered/manifests/agent-only/configmap-otel-agent.yaml b/rendered/manifests/agent-only/configmap-otel-agent.yaml index 98039f8ec4..c639933c7f 100644 --- a/rendered/manifests/agent-only/configmap-otel-agent.yaml +++ b/rendered/manifests/agent-only/configmap-otel-agent.yaml @@ -13,17 +13,17 @@ data: relay: | exporters: sapm: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} endpoint: https://ingest.CHANGEME.signalfx.com/v2/trace signalfx: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} api_url: https://api.CHANGEME.signalfx.com correlation: null ingest_url: https://ingest.CHANGEME.signalfx.com sync_host_metadata: true - splunk_hec: + splunk_hec/o11y: endpoint: https://ingest.CHANGEME.signalfx.com/v1/log - token: ${SPLUNK_ACCESS_TOKEN} + token: ${SPLUNK_O11Y_ACCESS_TOKEN} extensions: health_check: null k8s_observer: @@ -179,7 +179,7 @@ data: pipelines: logs: exporters: - - splunk_hec + - splunk_hec/o11y processors: - memory_limiter - groupbyattrs/logs diff --git a/rendered/manifests/agent-only/configmap-otel-k8s-cluster-receiver.yaml b/rendered/manifests/agent-only/configmap-otel-k8s-cluster-receiver.yaml index 3a0ab18eee..7816c1f7fc 100644 --- a/rendered/manifests/agent-only/configmap-otel-k8s-cluster-receiver.yaml +++ b/rendered/manifests/agent-only/configmap-otel-k8s-cluster-receiver.yaml @@ -13,7 +13,7 @@ data: relay: | exporters: signalfx: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} api_url: https://api.CHANGEME.signalfx.com ingest_url: https://ingest.CHANGEME.signalfx.com timeout: 10s diff --git a/rendered/manifests/agent-only/daemonset.yaml b/rendered/manifests/agent-only/daemonset.yaml index 81cdc4e2a4..883eddb2ca 100644 --- a/rendered/manifests/agent-only/daemonset.yaml +++ b/rendered/manifests/agent-only/daemonset.yaml @@ -23,7 +23,7 @@ spec: app: splunk-otel-collector release: default annotations: - checksum/config: 910a4b62c349010272d79c8b9df01763dbade96e38c112b6a42fe6c104065890 + checksum/config: 4a9f02f0872404f1a79b3f6137576e3ecea9f7f5c6f20f43f2472eea92e9e0e7 spec: hostNetwork: true dnsPolicy: ClusterFirstWithHostNet @@ -169,11 +169,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: splunk-otel-collector - key: splunk_access_token + key: splunk_o11y_access_token # Env variables for host metrics receiver - name: HOST_PROC value: /hostfs/proc diff --git a/rendered/manifests/agent-only/deployment-k8s-cluster-receiver.yaml b/rendered/manifests/agent-only/deployment-k8s-cluster-receiver.yaml index 5302de0904..f2fb91d422 100644 --- a/rendered/manifests/agent-only/deployment-k8s-cluster-receiver.yaml +++ b/rendered/manifests/agent-only/deployment-k8s-cluster-receiver.yaml @@ -24,7 +24,7 @@ spec: component: otel-k8s-cluster-receiver release: default annotations: - checksum/config: 5c0e85821c399d8b353982b0dbcf705f5ff08eed03210be69cd797db3d0ff22e + checksum/config: 74f886c0736a63c325ac5012c547ccfcd7ecddffea5cd7e6160a0cc18182a511 spec: serviceAccountName: default-splunk-otel-collector nodeSelector: @@ -61,11 +61,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: splunk-otel-collector - key: splunk_access_token + key: splunk_o11y_access_token readinessProbe: httpGet: path: / diff --git a/rendered/manifests/agent-only/secret.yaml b/rendered/manifests/agent-only/secret.yaml index d3ca1fcca2..706d2ee0c3 100644 --- a/rendered/manifests/agent-only/secret.yaml +++ b/rendered/manifests/agent-only/secret.yaml @@ -11,4 +11,4 @@ metadata: heritage: Helm type: Opaque data: - splunk_access_token: Q0hBTkdFTUU= + splunk_o11y_access_token: Q0hBTkdFTUU= diff --git a/rendered/manifests/gateway-only/configmap-otel-collector.yaml b/rendered/manifests/gateway-only/configmap-otel-collector.yaml index 11adc5769c..057b7d1b1e 100644 --- a/rendered/manifests/gateway-only/configmap-otel-collector.yaml +++ b/rendered/manifests/gateway-only/configmap-otel-collector.yaml @@ -13,15 +13,15 @@ data: relay: | exporters: sapm: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} endpoint: https://ingest.CHANGEME.signalfx.com/v2/trace signalfx: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} api_url: https://api.CHANGEME.signalfx.com ingest_url: https://ingest.CHANGEME.signalfx.com splunk_hec: endpoint: https://ingest.CHANGEME.signalfx.com/v1/log - token: ${SPLUNK_ACCESS_TOKEN} + token: ${SPLUNK_O11Y_ACCESS_TOKEN} extensions: health_check: null http_forwarder: @@ -130,12 +130,12 @@ data: service: extensions: - health_check - - http_forwarder - zpages + - http_forwarder pipelines: logs: exporters: - - splunk_hec + - splunk_hec/o11y processors: - memory_limiter - k8s_tagger diff --git a/rendered/manifests/gateway-only/deployment-collector.yaml b/rendered/manifests/gateway-only/deployment-collector.yaml index bc7ee23488..1579aff9e7 100644 --- a/rendered/manifests/gateway-only/deployment-collector.yaml +++ b/rendered/manifests/gateway-only/deployment-collector.yaml @@ -24,7 +24,7 @@ spec: component: otel-collector release: default annotations: - checksum/config: 6f482deaa97d3232e16bb8fa2888efec76f517190162c60f74ff5a591c049fc8 + checksum/config: e99e2c55b36bd4b2d5a5ab95db55c163b7226cb2d3cfd743a010de783251858d spec: serviceAccountName: default-splunk-otel-collector nodeSelector: @@ -61,11 +61,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: splunk-otel-collector - key: splunk_access_token + key: splunk_o11y_access_token ports: - name: http-forwarder containerPort: 6060 diff --git a/rendered/manifests/gateway-only/secret.yaml b/rendered/manifests/gateway-only/secret.yaml index d3ca1fcca2..706d2ee0c3 100644 --- a/rendered/manifests/gateway-only/secret.yaml +++ b/rendered/manifests/gateway-only/secret.yaml @@ -11,4 +11,4 @@ metadata: heritage: Helm type: Opaque data: - splunk_access_token: Q0hBTkdFTUU= + splunk_o11y_access_token: Q0hBTkdFTUU= diff --git a/rendered/manifests/logs-only/configmap-otel-agent.yaml b/rendered/manifests/logs-only/configmap-otel-agent.yaml index c1b4c18343..81bc43184c 100644 --- a/rendered/manifests/logs-only/configmap-otel-agent.yaml +++ b/rendered/manifests/logs-only/configmap-otel-agent.yaml @@ -13,14 +13,14 @@ data: relay: | exporters: signalfx: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} api_url: https://api.CHANGEME.signalfx.com correlation: null ingest_url: https://ingest.CHANGEME.signalfx.com sync_host_metadata: true - splunk_hec: + splunk_hec/o11y: endpoint: https://ingest.CHANGEME.signalfx.com/v1/log - token: ${SPLUNK_ACCESS_TOKEN} + token: ${SPLUNK_O11Y_ACCESS_TOKEN} extensions: health_check: null k8s_observer: @@ -138,7 +138,7 @@ data: pipelines: logs: exporters: - - splunk_hec + - splunk_hec/o11y processors: - memory_limiter - groupbyattrs/logs diff --git a/rendered/manifests/logs-only/daemonset.yaml b/rendered/manifests/logs-only/daemonset.yaml index e479f566b4..a31d5776c6 100644 --- a/rendered/manifests/logs-only/daemonset.yaml +++ b/rendered/manifests/logs-only/daemonset.yaml @@ -23,7 +23,7 @@ spec: app: splunk-otel-collector release: default annotations: - checksum/config: abb4c1d1d9eb516027b34d18561a5b776a5d26213a4a727f2b5f53b8988d6eb7 + checksum/config: 9a69db1310eaff3ec03d7c616908a71c5f17396b58c2caaf2d9a1f66b42ac523 spec: hostNetwork: true dnsPolicy: ClusterFirstWithHostNet @@ -149,11 +149,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: splunk-otel-collector - key: splunk_access_token + key: splunk_o11y_access_token readinessProbe: httpGet: diff --git a/rendered/manifests/logs-only/secret.yaml b/rendered/manifests/logs-only/secret.yaml index d3ca1fcca2..706d2ee0c3 100644 --- a/rendered/manifests/logs-only/secret.yaml +++ b/rendered/manifests/logs-only/secret.yaml @@ -11,4 +11,4 @@ metadata: heritage: Helm type: Opaque data: - splunk_access_token: Q0hBTkdFTUU= + splunk_o11y_access_token: Q0hBTkdFTUU= diff --git a/rendered/manifests/metrics-only/configmap-otel-agent.yaml b/rendered/manifests/metrics-only/configmap-otel-agent.yaml index ce69f9a2a8..a6d2abee37 100644 --- a/rendered/manifests/metrics-only/configmap-otel-agent.yaml +++ b/rendered/manifests/metrics-only/configmap-otel-agent.yaml @@ -13,7 +13,7 @@ data: relay: | exporters: signalfx: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} api_url: https://api.CHANGEME.signalfx.com correlation: null ingest_url: https://ingest.CHANGEME.signalfx.com diff --git a/rendered/manifests/metrics-only/configmap-otel-k8s-cluster-receiver.yaml b/rendered/manifests/metrics-only/configmap-otel-k8s-cluster-receiver.yaml index 3a0ab18eee..7816c1f7fc 100644 --- a/rendered/manifests/metrics-only/configmap-otel-k8s-cluster-receiver.yaml +++ b/rendered/manifests/metrics-only/configmap-otel-k8s-cluster-receiver.yaml @@ -13,7 +13,7 @@ data: relay: | exporters: signalfx: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} api_url: https://api.CHANGEME.signalfx.com ingest_url: https://ingest.CHANGEME.signalfx.com timeout: 10s diff --git a/rendered/manifests/metrics-only/daemonset.yaml b/rendered/manifests/metrics-only/daemonset.yaml index e4e4a29d17..9e5c8efb86 100644 --- a/rendered/manifests/metrics-only/daemonset.yaml +++ b/rendered/manifests/metrics-only/daemonset.yaml @@ -22,7 +22,7 @@ spec: app: splunk-otel-collector release: default annotations: - checksum/config: a8071b9a5ed466ddb2ceb9f015757c475782b354b1893d305041fac6d6702e8e + checksum/config: d23f5d85b5c0e22c609f91dc94cb609922a915eace0cae5b01b7dbfa5bdc1b3d spec: hostNetwork: true dnsPolicy: ClusterFirstWithHostNet @@ -77,11 +77,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: splunk-otel-collector - key: splunk_access_token + key: splunk_o11y_access_token # Env variables for host metrics receiver - name: HOST_PROC value: /hostfs/proc diff --git a/rendered/manifests/metrics-only/deployment-k8s-cluster-receiver.yaml b/rendered/manifests/metrics-only/deployment-k8s-cluster-receiver.yaml index 5302de0904..f2fb91d422 100644 --- a/rendered/manifests/metrics-only/deployment-k8s-cluster-receiver.yaml +++ b/rendered/manifests/metrics-only/deployment-k8s-cluster-receiver.yaml @@ -24,7 +24,7 @@ spec: component: otel-k8s-cluster-receiver release: default annotations: - checksum/config: 5c0e85821c399d8b353982b0dbcf705f5ff08eed03210be69cd797db3d0ff22e + checksum/config: 74f886c0736a63c325ac5012c547ccfcd7ecddffea5cd7e6160a0cc18182a511 spec: serviceAccountName: default-splunk-otel-collector nodeSelector: @@ -61,11 +61,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: splunk-otel-collector - key: splunk_access_token + key: splunk_o11y_access_token readinessProbe: httpGet: path: / diff --git a/rendered/manifests/metrics-only/secret.yaml b/rendered/manifests/metrics-only/secret.yaml index d3ca1fcca2..706d2ee0c3 100644 --- a/rendered/manifests/metrics-only/secret.yaml +++ b/rendered/manifests/metrics-only/secret.yaml @@ -11,4 +11,4 @@ metadata: heritage: Helm type: Opaque data: - splunk_access_token: Q0hBTkdFTUU= + splunk_o11y_access_token: Q0hBTkdFTUU= diff --git a/rendered/manifests/traces-only/configmap-otel-agent.yaml b/rendered/manifests/traces-only/configmap-otel-agent.yaml index 65f31af46c..8a4a8d1d38 100644 --- a/rendered/manifests/traces-only/configmap-otel-agent.yaml +++ b/rendered/manifests/traces-only/configmap-otel-agent.yaml @@ -13,10 +13,10 @@ data: relay: | exporters: sapm: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} endpoint: https://ingest.CHANGEME.signalfx.com/v2/trace signalfx: - access_token: ${SPLUNK_ACCESS_TOKEN} + access_token: ${SPLUNK_O11Y_ACCESS_TOKEN} api_url: https://api.CHANGEME.signalfx.com correlation: null ingest_url: https://ingest.CHANGEME.signalfx.com diff --git a/rendered/manifests/traces-only/daemonset.yaml b/rendered/manifests/traces-only/daemonset.yaml index 57553c70ba..ea1e616ad1 100644 --- a/rendered/manifests/traces-only/daemonset.yaml +++ b/rendered/manifests/traces-only/daemonset.yaml @@ -22,7 +22,7 @@ spec: app: splunk-otel-collector release: default annotations: - checksum/config: 5ebfd3a9e3bd58b56030678100bcd499c3a13fce4c3c32ca5818a0cce4dc6e38 + checksum/config: e7a1934bf7cfbef91ee17d642032bf88a269b4886b1bdbf956161728f846f759 spec: hostNetwork: true dnsPolicy: ClusterFirstWithHostNet @@ -89,11 +89,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: SPLUNK_ACCESS_TOKEN + - name: SPLUNK_O11Y_ACCESS_TOKEN valueFrom: secretKeyRef: name: splunk-otel-collector - key: splunk_access_token + key: splunk_o11y_access_token readinessProbe: httpGet: diff --git a/rendered/manifests/traces-only/secret.yaml b/rendered/manifests/traces-only/secret.yaml index d3ca1fcca2..706d2ee0c3 100644 --- a/rendered/manifests/traces-only/secret.yaml +++ b/rendered/manifests/traces-only/secret.yaml @@ -11,4 +11,4 @@ metadata: heritage: Helm type: Opaque data: - splunk_access_token: Q0hBTkdFTUU= + splunk_o11y_access_token: Q0hBTkdFTUU= diff --git a/rendered/values.yaml b/rendered/values.yaml index f35711969d..8d632709de 100644 --- a/rendered/values.yaml +++ b/rendered/values.yaml @@ -1,4 +1,5 @@ # These values are used in the pre-rendered helm templates. -splunkAccessToken: CHANGEME clusterName: CHANGEME -splunkRealm: CHANGEME +splunkObservability: + realm: CHANGEME + accessToken: CHANGEME