Datadog Agent + HashiCorp Vault templates
The Agent reads its API key and check credentials from Vault with its native backend, on Kubernetes and in Docker.
Two working templates for the same integration: the Datadog Agent’s native hashicorp.vault secret backend, so the Agent reads its API key and its checks’ credentials from Vault with no custom secret script.
The Kubernetes one uses the official datadog/datadog Helm chart (3.264.0), configured through datadog.secretBackend, with the Vault Kubernetes-auth role bound to the chart’s Agent ServiceAccount and a least-privilege policy. The Docker/Podman template does the same with Agent 7.85.0. Both were tested against Vault 1.21.2, the Kubernetes one on k3s.
Each ships a verify script: an http_check against a test API passes only with the credentials from Vault (200), fails when the secret changes (401), and recovers without restarting the Agent. Details: the write-up.