Skip to content

How to update manifest templates for Kubernetes DaemonSet

cswatt edited this page Jun 18, 2020 · 2 revisions

One of the options for monitoring Kubernetes infrastructures with the Datadog Agent is to use a DaemonSet, which involves the creation and deployment of a datadog-agent.yaml manifest. In this manifest, users configure what they want: logs, metrics, APM, combinations of the aforementioned, etc.

Users can learn about which parameters to set to enable each capability, but for ease of use, we've got a series of templates that have various combinations of capabilities enabled. So if you want APM and metrics only, we have an "APM and metrics only" template that you can just copy/paste.

In the Kubernetes DaemonSet documentation, we have the following templates:

  • Manifest with Logs, APM, process, metrics collection enabled.
  • Manifest with Logs, APM, and metrics collection enabled.
  • Manifest with Logs and metrics collection enabled.
  • Manifest with APM and metrics collection enabled.
  • Manifest with Network Performance Monitoring enabled
  • Vanilla manifest with just metrics collection enabled.

These are generated from the Helm chart as well as a number of *_values.yaml files in the documentation repo. To update these, make changes to the corresponding *_values.yaml files in static/resources/yaml and run generate.sh.

Prerequisites

Install Helm.

brew install helm

Install yq.

brew install yq

Add a Helm chart.

helm repo add stable https://kubernetes-charts.storage.googleapis.com/ && helm repo update

Sample workflow

Let's update the vanilla Agent manifest to enable NPM.

  1. Have your prerequisites ready.
  2. Open up static/resources/yaml/datadog-agent-vanilla_values.yaml
  3. Plop in these lines, which are required for NPM.
processAgent:
  enabled: true
systemProbe:
  enabled: true
  1. Run ./generate.sh
  2. Your datadog-agent-vanilla.yaml should update! Commit and push.
  3. Except don't actually do this, because the vanilla manifest should remain vanilla.

Thanks for coming with me on this journey, and thanks to Lénaïc Huard for this functionality.