Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save searbe/44d5beb2e58c7454be16f96f34456c94 to your computer and use it in GitHub Desktop.
Save searbe/44d5beb2e58c7454be16f96f34456c94 to your computer and use it in GitHub Desktop.
Datadog Kubernetes Daemonset with configurable Kubernetes gauges
kind: ConfigMap
apiVersion: v1
metadata:
name: dd-agent-config
namespace: default
data:
kubernetes-config: |-
init_config:
instances:
- port: 4194
enabled_gauges:
- filesystem.*
- memory.*
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: dd-agent
namespace: default
spec:
template:
metadata:
labels:
app: dd-agent
name: dd-agent
spec:
containers:
- image: datadog/docker-dd-agent:latest
imagePullPolicy: Always
name: dd-agent
ports:
- containerPort: 8125
name: dogstatsdport
protocol: UDP
env:
- name: API_KEY
value: { DATADOG_API_KEY }
- name: SD_BACKEND
value: docker
volumeMounts:
- name: dockersocket
mountPath: /var/run/docker.sock
- name: procdir
mountPath: /host/proc
readOnly: true
- name: cgroups
mountPath: /host/sys/fs/cgroup
readOnly: true
- name: dd-agent-config
mountPath: /conf.d
volumes:
- name: dockersocket
hostPath:
path: /var/run/docker.sock
- name: procdir
hostPath:
path: /proc
- name: cgroups
hostPath:
path: /sys/fs/cgroup
- name: dd-agent-config
configMap:
name: dd-agent-config
items:
- key: kubernetes-config
path: kubernetes.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment