---
# Source: splunk-otel-collector/templates/configmap-otel-k8s-cluster-receiver.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: default-splunk-otel-collector-otel-k8s-cluster-receiver
  labels:
    app: splunk-otel-collector
    chart: splunk-otel-collector-0.24.13
    release: default
    heritage: Helm
data:
  relay: |
    exporters:
      signalfx:
        access_token: ${SPLUNK_ACCESS_TOKEN}
        api_url: https://api.CHANGEME.signalfx.com
        ingest_url: https://ingest.CHANGEME.signalfx.com
        timeout: 10s
    extensions:
      health_check: {}
    processors:
      batch: null
      k8s_tagger:
        filter:
          labels:
            key: component
            op: equals
            value: otel-k8s-cluster-receiver
          node_from_env_var: K8S_NODE_NAME
      memory_limiter:
        ballast_size_mib: ${SPLUNK_BALLAST_SIZE_MIB}
        check_interval: 5s
        limit_mib: ${SPLUNK_MEMORY_LIMIT_MIB}
      resource:
        attributes:
        - action: insert
          key: metric_source
          value: kubernetes
        - action: upsert
          key: k8s.cluster.name
          value: CHANGEME
    receivers:
      k8s_cluster:
        auth_type: serviceAccount
        metadata_exporters:
        - signalfx
      prometheus:
        config:
          scrape_configs:
          - job_name: otel-k8s-cluster-receiver
            scrape_interval: 10s
            static_configs:
            - targets:
              - ${K8S_POD_IP}:8888
    service:
      extensions:
      - health_check
      pipelines:
        metrics:
          exporters:
          - signalfx
          processors:
          - memory_limiter
          - batch
          - resource
          receivers:
          - prometheus
          - k8s_cluster
