Integrate datadog agent into the boutique app
This commit is contained in:
parent
d04a5384a5
commit
c7f718a7f1
1 changed files with 246 additions and 0 deletions
|
@ -16,6 +16,252 @@
|
|||
# WARNING: This file is autogenerated. Do not manually edit.
|
||||
# ----------------------------------------------------------
|
||||
|
||||
# Source: datadog/templates/daemonset.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: datadog-agent
|
||||
labels: {}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: datadog-agent
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: datadog-agent
|
||||
name: datadog-agent
|
||||
annotations: {}
|
||||
spec:
|
||||
containers:
|
||||
- name: agent
|
||||
image: "datadog/agent:7.21.1"
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["agent", "run"]
|
||||
resources: {}
|
||||
ports:
|
||||
- containerPort: 8125
|
||||
name: dogstatsdport
|
||||
protocol: UDP
|
||||
env:
|
||||
- name: DD_CRI_SOCKET_PATH
|
||||
value: "unix:///host/var/run/docker.sock"
|
||||
- name: DD_KUBELET_TLS_VERIFY
|
||||
value: "false"
|
||||
# To pick the docker logs directly and submit it to the datadog server.
|
||||
- name: DOCKER_HOST
|
||||
value: "unix:///host/var/run/docker.sock"
|
||||
#TODO : API key needs to be used from the "secrets" container above, but
|
||||
# somehow its not working currently and so putting the secret directly here.
|
||||
# The problem that i am facing is the "secrets" against is somehow adding the newline
|
||||
# character to the key making the key invalid and hence not working.
|
||||
- name: DD_API_KEY
|
||||
value: "77ed0972ca94340f9db3fb78ee5e89cc"
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: "datadog-agent"
|
||||
# key: api-key
|
||||
- name: DD_KUBERNETES_KUBELET_HOST
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: KUBERNETES
|
||||
value: "yes"
|
||||
- name: DD_CONTAINER_EXCLUDE
|
||||
value: "image:datadog/agent"
|
||||
- name: DD_AC_EXCLUDE
|
||||
value: "name:datadog-agent"
|
||||
- name: DD_LOG_LEVEL
|
||||
value: "INFO"
|
||||
- name: DD_DOGSTATSD_PORT
|
||||
value: "8125"
|
||||
- name: DD_LEADER_ELECTION
|
||||
value: "true"
|
||||
- name: DD_COLLECT_KUBERNETES_EVENTS
|
||||
value: "true"
|
||||
- name: DD_APM_ENABLED
|
||||
value: "true"
|
||||
- name: DD_LOGS_ENABLED
|
||||
value: "true"
|
||||
- name: DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL
|
||||
value: "true"
|
||||
- name: DD_LOGS_CONFIG_K8S_CONTAINER_USE_FILE
|
||||
value: "true"
|
||||
- name: DD_HEALTH_PORT
|
||||
value: "5555"
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/datadog-agent
|
||||
- name: runtimesocketdir
|
||||
mountPath: /host/var/run
|
||||
readOnly: true
|
||||
- name: procdir
|
||||
mountPath: /host/proc
|
||||
readOnly: true
|
||||
- name: cgroups
|
||||
mountPath: /host/sys/fs/cgroup
|
||||
readOnly: true
|
||||
- name: pointerdir
|
||||
mountPath: /opt/datadog-agent/run
|
||||
- name: logpodpath
|
||||
mountPath: /var/log/pods
|
||||
readOnly: true
|
||||
- name: logdockercontainerpath
|
||||
mountPath: /var/lib/docker/containers
|
||||
readOnly: true
|
||||
# - name: dockersocketdir
|
||||
# mountPath: /host/var/run
|
||||
livenessProbe:
|
||||
failureThreshold: 6
|
||||
httpGet:
|
||||
path: /live
|
||||
port: 5555
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 15
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
failureThreshold: 6
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: 5555
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 15
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
- name: trace-agent
|
||||
image: "datadog/agent:7.21.1"
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["trace-agent", "-config=/etc/datadog-agent/datadog.yaml"]
|
||||
resources: {}
|
||||
ports:
|
||||
- containerPort: 8126
|
||||
hostPort: 8126
|
||||
name: traceport
|
||||
protocol: TCP
|
||||
env:
|
||||
#TODO : API key needs to be used from the "secrets" container above, but
|
||||
# somehow its not working currently and so putting the secret directly here.
|
||||
# The problem that i am facing is the "secrets" against is somehow adding the newline
|
||||
# character to the key making the key invalid and hence not working.
|
||||
- name: DD_API_KEY
|
||||
value: "77ed0972ca94340f9db3fb78ee5e89cc"
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: "datadog-agent"
|
||||
# key: api-key
|
||||
- name: DD_KUBERNETES_KUBELET_HOST
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: KUBERNETES
|
||||
value: "yes"
|
||||
- name: DD_CONTAINER_EXCLUDE
|
||||
value: "image:datadog/agent"
|
||||
- name: DOCKER_HOST
|
||||
value: "unix:///host/var/run/docker.sock"
|
||||
- name: DD_LOG_LEVEL
|
||||
value: "debug"
|
||||
- name: DD_APM_ENABLED
|
||||
value: "true"
|
||||
- name: DD_APM_NON_LOCAL_TRAFFIC
|
||||
value: "true"
|
||||
- name: DD_APM_RECEIVER_PORT
|
||||
value: "8126"
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/datadog-agent
|
||||
- name: runtimesocketdir
|
||||
mountPath: /host/var/run
|
||||
readOnly: true
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 15
|
||||
tcpSocket:
|
||||
port: 8126
|
||||
timeoutSeconds: 5
|
||||
initContainers:
|
||||
- name: init-volume
|
||||
image: "datadog/agent:7.21.1"
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["bash", "-c"]
|
||||
args:
|
||||
- cp -r /etc/datadog-agent /opt
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /opt/datadog-agent
|
||||
resources: {}
|
||||
- name: init-config
|
||||
image: "datadog/agent:7.21.1"
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["bash", "-c"]
|
||||
args:
|
||||
- for script in $(find /etc/cont-init.d/ -type f -name '*.sh' | sort) ; do bash $script ; done
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/datadog-agent
|
||||
- name: procdir
|
||||
mountPath: /host/proc
|
||||
readOnly: true
|
||||
- name: runtimesocketdir
|
||||
mountPath: /host/var/run
|
||||
readOnly: true
|
||||
env:
|
||||
#TODO : API key needs to be used from the "secrets" container above, but
|
||||
# somehow its not working currently and so putting the secret directly here.
|
||||
# The problem that i am facing is the "secrets" against is somehow adding the newline
|
||||
# character to the key making the key invalid and hence not working.
|
||||
- name: DD_API_KEY
|
||||
value: "77ed0972ca94340f9db3fb78ee5e89cc"
|
||||
- name: DD_KUBERNETES_KUBELET_HOST
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: KUBERNETES
|
||||
value: "yes"
|
||||
- name: DD_AC_EXCLUDE
|
||||
value: "name:datadog-agent"
|
||||
- name: DOCKER_HOST
|
||||
value: "unix:///host/var/run/docker.sock"
|
||||
- name: DD_LEADER_ELECTION
|
||||
value: "true"
|
||||
resources: {}
|
||||
volumes:
|
||||
- name: config
|
||||
emptyDir: {}
|
||||
- hostPath:
|
||||
path: /var/run
|
||||
name: runtimesocketdir
|
||||
- hostPath:
|
||||
path: /proc
|
||||
name: procdir
|
||||
- hostPath:
|
||||
path: /sys/fs/cgroup
|
||||
name: cgroups
|
||||
- name: s6-run
|
||||
emptyDir: {}
|
||||
- hostPath:
|
||||
path: "/var/lib/datadog-agent/logs"
|
||||
name: pointerdir
|
||||
- hostPath:
|
||||
path: /var/log/pods
|
||||
name: logpodpath
|
||||
- hostPath:
|
||||
path: /var/lib/docker/containers
|
||||
name: logdockercontainerpath
|
||||
- hostPath:
|
||||
path: /var/run
|
||||
name: dockersocketdir
|
||||
tolerations:
|
||||
affinity: {}
|
||||
serviceAccountName: "datadog-agent"
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxUnavailable: 10%
|
||||
type: RollingUpdate
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
|
Loading…
Add table
Reference in a new issue