---
# Source: splunk-otel-collector/templates/configmap-otel-collector.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: default-splunk-otel-collector-otel-collector
  labels:
    app: splunk-otel-collector
    chart: splunk-otel-collector-0.28.0
    release: default
    heritage: Helm
data:
  relay: |
    exporters:
      sapm:
        access_token: ${SPLUNK_ACCESS_TOKEN}
        endpoint: https://ingest.CHANGEME.signalfx.com/v2/trace
      signalfx:
        access_token: ${SPLUNK_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}
    extensions:
      health_check: null
      http_forwarder:
        egress:
          endpoint: https://api.CHANGEME.signalfx.com
      zpages: null
    processors:
      batch: null
      k8s_tagger:
        extract:
          metadata:
          - namespace
          - node
          - podName
          - podUID
      memory_limiter:
        ballast_size_mib: ${SPLUNK_BALLAST_SIZE_MIB}
        check_interval: 5s
        limit_mib: ${SPLUNK_MEMORY_LIMIT_MIB}
      resource/add_cluster_name:
        attributes:
        - action: upsert
          key: k8s.cluster.name
          value: CHANGEME
    receivers:
      jaeger:
        protocols:
          grpc:
            endpoint: 0.0.0.0:14250
          thrift_http:
            endpoint: 0.0.0.0:14268
      otlp:
        protocols:
          grpc:
            endpoint: 0.0.0.0:4317
          http:
            endpoint: 0.0.0.0:55681
      prometheus:
        config:
          scrape_configs:
          - job_name: otel-collector
            scrape_interval: 10s
            static_configs:
            - targets:
              - ${K8S_POD_IP}:8888
      sapm:
        endpoint: 0.0.0.0:7276
      signalfx:
        access_token_passthrough: true
        endpoint: 0.0.0.0:9943
      zipkin:
        endpoint: 0.0.0.0:9411
    service:
      extensions:
      - health_check
      - http_forwarder
      - zpages
      pipelines:
        logs:
          exporters:
          - splunk_hec
          processors:
          - memory_limiter
          - batch
          receivers:
          - otlp
        logs/signalfx-events:
          exporters:
          - signalfx
          processors:
          - memory_limiter
          - batch
          receivers:
          - signalfx
        metrics:
          exporters:
          - signalfx
          processors:
          - memory_limiter
          - batch
          - resource/add_cluster_name
          receivers:
          - otlp
          - prometheus
          - signalfx
        traces:
          exporters:
          - sapm
          processors:
          - memory_limiter
          - batch
          - k8s_tagger
          - resource/add_cluster_name
          receivers:
          - otlp
          - jaeger
          - zipkin
          - sapm
