[stable/datadog] ADD UDS socket for trace agent (#22463)

* Add `DD_AC_INCLUDE` and `DD_AC_EXCLUDE` to all containers
* Add "Unix Domain Socket" support in trace-agent
* Add new parameter to specify the dogstatsd socket path on the host
* Fix typos in values.yaml
* Update "tags:" example in values.yaml
* Add rate_limit_queries_ metrics

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
This commit is contained in:
Cedric Lamoriniere
2020-05-26 02:05:11 -07:00
committed by GitHub
parent 3e7dde8921
commit 0da34dafa5
10 changed files with 80 additions and 20 deletions
+9
View File
@@ -1,5 +1,14 @@
# Datadog changelog
## 2.3.5
* Add `DD_AC_INCLUDE` and `DD_AC_EXCLUDE` to all containers
* Add "Unix Domain Socket" support in trace-agent
* Add new parameter to specify the dogstatsd socket path on the host
* Fix typos in values.yaml
* Update "tags:" example in values.yaml
* Add "rate_limit_queries_*" in the datadog.cluster-agent prometheus check configuration
## 2.3.4
* Fix default values in `values.yaml` to prevent warnings with Helm 2.x
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 2.3.4
version: 2.3.5
appVersion: "7"
description: Datadog Agent
keywords:
+5 -1
View File
@@ -294,6 +294,9 @@ helm install --name <RELEASE_NAME> \
| `datadog.logs.containerCollectUsingFiles` | Collect container logs from files on disk instead of container runtime API | `true` |
| `datadog.apm.enabled` | Enable tracing from the host | `false` |
| `datadog.apm.port` | Used to override the default agent APM Port | `8126` |
| `datadog.apm.useSocketVolume` | Enable APM over Unix Domain Socket | `False` |
| `datadog.apm.socketPath` | Custom path to the socket, has to be located in the `/var/run/datadog/` folder path | `/var/run/datadog/apm.socket` |
| `datadog.apm.hostPath` | host directory that contains the trace-agent socket path | `/var/run/datadog/` |
| `datadog.clusterChecks.enabled` | Enable Cluster Checks on both the Cluster Agent and the Agent daemonset | `false` |
| `datadog.processAgent.enabled` | Enable live process and container monitoring agent. Possible values: `true` enable process-agent, `false` disable process-agent | `true` |
| `datadog.processAgent.processCollection` | Enable live process collection. Possible values: `true` enable process collection, `false` disable process collection | `false` |
@@ -308,7 +311,8 @@ helm install --name <RELEASE_NAME> \
| `datadog.dogstatsd.useHostPort` | If true, use the same ports for both host and container | `nil` |
| `datadog.dogstatsd.nonLocalTraffic` | Enable statsd reporting from any external ip | `False` |
| `datadog.dogstatsd.useSocketVolume` | Enable dogstatsd over Unix Domain Socket | `False` |
| `datadog.dogstatsd.socketPath` | Custom path to the socket, has to be located in the `/var/run/datadog` folder path | `/var/run/datadog/dsd.socket` |
| `datadog.dogstatsd.socketPath` | Custom path to the socket, has to be located in the `/var/run/datadog/` folder path | `/var/run/datadog/dsd.socket` |
| `datadog.dogstatsd.hostPath` | host directory that contains the dogstatsd socket | `/var/run/datadog/` |
| `datadog.nodeLabelsAsTags` | Kubernetes Node Labels to Datadog Tags mapping | `nil` |
| `datadog.podAnnotationsAsTags` | Kubernetes Annotations to Datadog Tags mapping | `nil` |
| `datadog.podLabelsAsTags` | Kubernetes Labels to Datadog Tags mapping | `nil` |
+11
View File
@@ -0,0 +1,11 @@
# Empty values file for testing default parameters.
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"
dogstatsd:
useSocketVolume: true
apm:
enabled: true
useSocketVolume: true
@@ -44,7 +44,7 @@ spec:
"metrics": [
"go_goroutines", "go_memstats_*", "process_*",
"api_requests",
"datadog_requests", "external_metrics",
"datadog_requests", "external_metrics", "rate_limit_queries_*",
"cluster_checks_*"
]
}]
+2 -10
View File
@@ -30,14 +30,6 @@
- name: DD_DOGSTATSD_ORIGIN_DETECTION
value: {{ .Values.datadog.dogstatsd.originDetection | quote }}
{{- end }}
{{- if .Values.datadog.acInclude }}
- name: DD_AC_INCLUDE
value: {{ .Values.datadog.acInclude | quote }}
{{- end }}
{{- if .Values.datadog.acExclude }}
- name: DD_AC_EXCLUDE
value: {{ .Values.datadog.acExclude | quote }}
{{- end }}
{{- if not .Values.clusterAgent.enabled }}
{{- if .Values.datadog.leaderElection }}
- name: DD_LEADER_ELECTION
@@ -76,7 +68,7 @@
{{- end }}
{{- if .Values.datadog.dogstatsd.useSocketVolume }}
- name: DD_DOGSTATSD_SOCKET
value: {{ default "/var/run/datadog/dsd.socket" .Values.datadog.dogstatsd.socketPath | quote }}
value: {{ .Values.datadog.dogstatsd.socketPath | quote }}
{{- end }}
{{- if and .Values.datadog.clusterChecks.enabled (not .Values.clusterChecksRunner.enabled) }}
- name: DD_EXTRA_CONFIG_PROVIDERS
@@ -110,7 +102,7 @@
{{- if eq .Values.targetSystem "linux" }}
{{- if .Values.datadog.dogstatsd.useSocketVolume }}
- name: dsdsocket
mountPath: "/var/run/datadog"
mountPath: {{ (dir .Values.datadog.dogstatsd.socketPath) }}
{{- end }}
{{- if .Values.datadog.systemProbe.enabled }}
- name: sysprobe-socket-dir
@@ -25,6 +25,10 @@
value: "true"
- name: DD_APM_RECEIVER_PORT
value: {{ .Values.datadog.apm.port | quote }}
{{- if .Values.datadog.apm.useSocketVolume -}}
- name: DD_APM_RECEIVER_SOCKET
value: {{ .Values.datadog.apm.socketPath | quote }}
{{- end }}
{{- range $value := .Values.agents.containers.traceAgent.env }}
- name: {{ $value.name }}
value: {{ $value.value | quote }}
@@ -46,6 +50,10 @@
- name: runtimesocket
mountPath: {{ template "datadog.dockerOrCriSocketPath" . }}
{{- end }}
{{- if .Values.datadog.apm.useSocketVolume }}
- name: apmsocket
mountPath: {{ (dir .Values.datadog.apm.socketPath) }}
{{- end }}
livenessProbe:
{{ toYaml .Values.agents.containers.traceAgent.livenessProbe | indent 4 }}
{{- end -}}
@@ -53,6 +53,14 @@
- name: {{ $value.name }}
value: {{ $value.value | quote }}
{{- end }}
{{- if .Values.datadog.acInclude }}
- name: DD_AC_INCLUDE
value: {{ .Values.datadog.acInclude | quote }}
{{- end }}
{{- if .Values.datadog.acExclude }}
- name: DD_AC_EXCLUDE
value: {{ .Values.datadog.acExclude | quote }}
{{- end }}
{{- if .Values.datadog.criSocketPath }}
- name: DD_CRI_SOCKET_PATH
value: {{ print "/host/" .Values.datadog.criSocketPath | clean }}
@@ -7,9 +7,16 @@
name: cgroups
{{- if .Values.datadog.dogstatsd.useSocketVolume }}
- hostPath:
path: "/var/run/datadog/"
path: {{ .Values.datadog.dogstatsd.hostSocketPath }}
type: DirectoryOrCreate
name: dsdsocket
{{- end }}
{{- if .Values.datadog.apm.useSocketVolume }}
- hostPath:
path: {{ .Values.datadog.apm.hostSocketPath }}
type: DirectoryOrCreate
name: apmsocket
{{- end }}
- name: s6-run
emptyDir: {}
{{- if (or (.Values.datadog.confd) (.Values.datadog.autoconf)) }}
+27 -6
View File
@@ -127,8 +127,8 @@ datadog:
## Learn more about tagging: https://docs.datadoghq.com/tagging/
#
tags:
# - <KEY_1>:<VALUE_1>
# - <KEY_2>:<VALUE_2>
# - "<KEY_1>:<VALUE_1>"
# - "<KEY_2>:<VALUE_2>"
## @param dogstatsd - object - required
## dogstatsd configuration
@@ -146,18 +146,23 @@ datadog:
## Enable origin detection for container tagging
## https://docs.datadoghq.com/developers/dogstatsd/unix_socket/#using-origin-detection-for-container-tagging
#
originDetection: # true
originDetection: false
## @param useSocketVolume - boolean - optional
## Enable dogstatsd over Unix Domain Socket
## ref: https://docs.datadoghq.com/developers/dogstatsd/unix_socket/
#
useSocketVolume: # true
useSocketVolume: false
## @param socketPath - string - optional
## Path to the DogStatsD socket
#
socketPath: # /var/run/datadog/dsd.socket
socketPath: /var/run/datadog/dsd.socket
## @param hostSocketPath - string - optional
## host path to the DogStatsD socket
#
hostSocketPath: /var/run/datadog/
## @param useHostPort - boolean - optional
## Sets the hostPort to the same value of the container port. Needs to be used
@@ -236,6 +241,22 @@ datadog:
#
port: 8126
## @param useSocketVolume - boolean - optional
## Enable APM over Unix Domain Socket
## ref: https://docs.datadoghq.com/agent/kubernetes/apm/
#
useSocketVolume: false
## @param socketPath - string - optional
## Path to the trace-agent socket
#
socketPath: /var/run/datadog/apm.socket
## @param hostSocketPath - string - optional
## host path to the trace-agent socket
#
hostSocketPath: /var/run/datadog/
## @param env - list of object - optional
## The dd-agent supports many environment variables
## ref: https://github.com/DataDog/datadog-agent/tree/master/Dockerfiles/agent#environment-variables
@@ -903,7 +924,7 @@ clusterChecksRunner:
serviceAccountName: default
## @param replicas - integer - required
## If you want to deploy the cluckerchecks agent in HA, keep at least clusterChecksRunner.replicas set to 2.
## If you want to deploy the clusterChecks agent in HA, keep at least clusterChecksRunner.replicas set to 2.
## And increase the clusterChecksRunner.replicas according to the number of Cluster Checks.
#
replicas: 2