Last active
March 15, 2020 11:46
-
-
Save ams0/a78a8eaa9044d3c88ab778ff6b0f83d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
name: datadog-agent | |
namespace: datadog | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: datadog-agent | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: datadog-agent | |
subjects: | |
- kind: ServiceAccount | |
name: datadog-agent | |
namespace: datadog | |
--- | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: datadog-agent | |
spec: | |
selector: | |
matchLabels: | |
app: datadog-agent | |
template: | |
metadata: | |
labels: | |
app: datadog-agent | |
name: datadog-agent | |
spec: | |
serviceAccountName: datadog-agent | |
containers: | |
- image: datadog/agent:7 | |
imagePullPolicy: Always | |
name: datadog-agent | |
ports: | |
- containerPort: 8125 | |
# Custom metrics via DogStatsD - uncomment this section to enable custom metrics collection | |
# hostPort: 8125 | |
name: dogstatsdport | |
protocol: UDP | |
- containerPort: 8126 | |
# Trace Collection (APM) - uncomment this section to enable APM | |
# hostPort: 8126 | |
name: traceport | |
protocol: TCP | |
env: | |
- name: DD_API_KEY | |
valueFrom: | |
secretKeyRef: | |
name: datadog-secret | |
key: api-key | |
- name: DD_COLLECT_KUBERNETES_EVENTS | |
value: "true" | |
- name: DD_LEADER_ELECTION | |
value: "true" | |
- name: KUBERNETES | |
value: "true" | |
- name: DD_HEALTH_PORT | |
value: "5555" | |
- name: DD_KUBERNETES_KUBELET_HOST | |
valueFrom: | |
fieldRef: | |
fieldPath: status.hostIP | |
- name: DD_APM_ENABLED | |
value: "true" | |
resources: | |
requests: | |
memory: "256Mi" | |
cpu: "200m" | |
limits: | |
memory: "256Mi" | |
cpu: "200m" | |
volumeMounts: | |
- name: dockersocket | |
mountPath: /var/run/docker.sock | |
- name: procdir | |
mountPath: /host/proc | |
readOnly: true | |
- name: cgroups | |
mountPath: /host/sys/fs/cgroup | |
readOnly: true | |
livenessProbe: | |
httpGet: | |
path: /health | |
port: 5555 | |
initialDelaySeconds: 15 | |
periodSeconds: 15 | |
timeoutSeconds: 5 | |
successThreshold: 1 | |
failureThreshold: 3 | |
volumes: | |
- hostPath: | |
path: /var/run/docker.sock | |
name: dockersocket | |
- hostPath: | |
path: /proc | |
name: procdir | |
- hostPath: | |
path: /sys/fs/cgroup | |
name: cgroups |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment