DataDog / helm-charts

Helm charts for Datadog products
Apache License 2.0
349 stars 1.02k forks source link

3.81.0 Helm chart renders otel-configmap.yaml, but does not install it #1618

Open clarkritchie opened 3 days ago

clarkritchie commented 3 days ago

Using the 3.81.0 Helm chart, I have an Otel config in my values file, e.g.

...
    otelCollector:
      enabled: true
      config: |-
        receivers:
          otlp:
            protocols:
              grpc:
                endpoint: 0.0.0.0:9876  # use a random port to prove that it is using my config
...

When I render this, the ConfigMap is as I expect it -- I see my config, e.g. this is using port 9876:

$ helm template datadog-otlp --namespace datadog --values /tmp/datadog-otlp-values.yaml . | grep -A 6 otel-config.yaml
  otel-config.yaml:     |-
        receivers:
          otlp:
            protocols:
              grpc:
                endpoint: 0.0.0.0:9876

However, when I install it, this is the config that is being passed to the otel-agent -- this YAML file appears to be identical to this config -- i.e. the port is 4317 (not 9876), it has a job_name: 'otel-collector', the comments match, and so on.

root@datadog-otlp-5rj2z:/etc/datadog-agent# cat otel-config.yaml  | grep -A 6 receivers
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

I am currently testing with:

    image:
      repository: datadog/agent-dev
      tag: nightly-ot-beta-main
      doNotCheckTag: true
      tagSuffix: jmx

It's also not clear if the syntax in my values file should be this, which FWIW also does not seem to work:

    otelCollector:
      enabled: true
      ports:
        - containerPort: "8734"
          name: otel-grpc
        - containerPort: "4318"
          name: otel-http

      config: |-
        receivers:
          otlp:
            protocols:
              grpc:
                endpoint: 0.0.0.0:8734
              http:
                endpoint: 0.0.0.0:4318