Skip to content

Datadog Output should accept ApiKey as an environment variable #17075

Open
@MathewBoyles

Description

@MathewBoyles

Use Case

My use-case is inside Kubernetes. I am using a Secret so the apikey does not need to be hard-coded into the config. My Helmfile is kept inside source control, but the key remains only inside the Kubernetes cluster.

releases:
  - name: telegraf
    namespace: telegraf
    createNamespace: true
    chart: influxdata/telegraf
    version: 1.8.57
    needs:
      - datadog-api-key
    values:
      - config:
          agent:
            env:
              - name: DD_API_KEY
                valueFrom:
                  secretKeyRef:
                    name: datadog-api-key
                    key: token
          processors: []
          outputs:
            - datadog:
                apikey: ""
                envvar: "DD_API_KEY"

Expected behavior

When enabled, Datadog output plugin will use the value of the specified environment variable for the api key.

Actual behavior

The Datadog output plugin does not use envrionment variables and requires the API key to be hard-coded into the config file.

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequests for new plugin and for new features to existing plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions