diff --git a/stable/datadog/CHANGELOG.md b/stable/datadog/CHANGELOG.md index 748da882d231..67818f249686 100644 --- a/stable/datadog/CHANGELOG.md +++ b/stable/datadog/CHANGELOG.md @@ -2,6 +2,11 @@ ## 2.0 +## 2.0.1 + +* Add parameters `datadog.logs.enabled` and `datadog.logs.containerCollectAll` to replace `datadog.logsEnabled` and `datadog.logsConfigContainerCollectAll`. +* Update the migration document link in the `Readme.md`. + ### 2.0.0 * Remove Datadog agent deployment configuration. diff --git a/stable/datadog/Chart.yaml b/stable/datadog/Chart.yaml index c8cd8154fef9..f30ce112e94b 100644 --- a/stable/datadog/Chart.yaml +++ b/stable/datadog/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: datadog -version: 2.0.0 +version: 2.0.1 appVersion: "7" description: DataDog Agent keywords: diff --git a/stable/datadog/README.md b/stable/datadog/README.md index 70fcb3db7882..d3b0f06bdba1 100644 --- a/stable/datadog/README.md +++ b/stable/datadog/README.md @@ -61,10 +61,10 @@ You can specify the Datadog Cluster Agent token used to secure the communication #### From 1.x to 2.x -⚠️ Migrating from 1.x to 2.x requires a manual action. +⚠️ Migrating from 1.x to 2.x requires a manual action. The `datadog` chart has been refactored to regroup the `values.yaml` parameters in a more logical way. -Please follow the [migration guide](docs/Migration_1.x_to_2.x.md) to update you `values.yaml` file. +Please follow the [migration guide](https://github.com/helm/charts/blob/master/stable/datadog/docs/Migration_1.x_to_2.x.md) to update you `values.yaml` file. #### From 1.19.0 onwards @@ -265,8 +265,8 @@ helm install --name \ | `datadog.dd_url` | Datadog intake server | `nil` | | `datadog.env` | Additional Datadog environment variables | `nil` | | `datadog.logLevel` | Agent log verbosity (possible values: trace, debug, info, warn, error, critical, and off) | `INFO` | -| `datadog.logsEnabled` | Enable log collection | `nil` | -| `datadog.logsConfigContainerCollectAll` | Collect logs from all containers | `nil` | +| `datadog.logs.enabled` | Enable log collection | `nil` | +| `datadog.logs.containerCollectAll` | Collect logs from all containers | `nil` | | `datadog.logsPointerHostPath` | Host path to store the log tailing state in | `/var/lib/datadog-agent/logs` | | `datadog.apm.enabled` | Enable tracing from the host | `false` | | `datadog.apm.port` | Used to override the default agent APM Port | `8126` | diff --git a/stable/datadog/docs/Migration_1.x_to_2.x.md b/stable/datadog/docs/Migration_1.x_to_2.x.md index ab123f1d5a9a..3d1af5e79570 100644 --- a/stable/datadog/docs/Migration_1.x_to_2.x.md +++ b/stable/datadog/docs/Migration_1.x_to_2.x.md @@ -66,3 +66,5 @@ location in v1 and v2. | `clusterchecksDeployment.tolerations` | `clusterChecksRunner.tolerations` | | | `clusterchecksDeployment.livenessProbe` | `clusterChecksRunner.livenessProbe` | | | `clusterchecksDeployment.env` | `clusterChecksRunner.env` | | +| `logsEnabled` | `logs.enabled` | | +| `logsConfigContainerCollectAll` | `logs.containerCollectAll` | | diff --git a/stable/datadog/templates/cluster-agent-deployment.yaml b/stable/datadog/templates/cluster-agent-deployment.yaml index aa925b525633..b07c60d504f3 100644 --- a/stable/datadog/templates/cluster-agent-deployment.yaml +++ b/stable/datadog/templates/cluster-agent-deployment.yaml @@ -153,7 +153,9 @@ spec: readinessProbe: {{ toYaml .Values.clusterAgent.readinessProbe | indent 10 }} volumeMounts: +{{- if .Values.clusterAgent.volumeMounts }} {{ toYaml .Values.clusterAgent.volumeMounts | indent 10 }} +{{- end }} {{- if .Values.clusterAgent.confd }} - name: confd mountPath: /conf.d diff --git a/stable/datadog/templates/container-agent.yaml b/stable/datadog/templates/container-agent.yaml index 041dd61326df..4bf88dc8ffa3 100644 --- a/stable/datadog/templates/container-agent.yaml +++ b/stable/datadog/templates/container-agent.yaml @@ -81,14 +81,10 @@ - name: DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS value: '{{ toJson .Values.datadog.podAnnotationsAsTags }}' {{- end }} - {{- if .Values.datadog.logsEnabled }} - name: DD_LOGS_ENABLED - value: {{.Values.datadog.logsEnabled | quote}} - {{- end }} - {{- if .Values.datadog.logsConfigContainerCollectAll }} + value: {{ (default false (or .Values.datadog.logs.enabled .Values.datadog.logsEnabled)) | quote}} - name: DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL - value: {{.Values.datadog.logsConfigContainerCollectAll | quote}} - {{- end }} + value: {{ (default false (or .Values.datadog.logs.containerCollectAll .Values.datadog.logsConfigContainerCollectAll)) | quote}} {{- if .Values.datadog.criSocketPath }} - name: DD_CRI_SOCKET_PATH value: {{ print "/host/" .Values.datadog.criSocketPath | clean }} @@ -131,7 +127,7 @@ - name: cgroups mountPath: /host/sys/fs/cgroup readOnly: true - {{- if .Values.datadog.logsEnabled }} + {{- if or .Values.datadog.logs.enabled .Values.datadog.logsEnabled }} - name: pointerdir mountPath: /opt/datadog-agent/run - name: logpodpath diff --git a/stable/datadog/templates/daemonset.yaml b/stable/datadog/templates/daemonset.yaml index dd300fafd858..9e2ad75a9976 100644 --- a/stable/datadog/templates/daemonset.yaml +++ b/stable/datadog/templates/daemonset.yaml @@ -105,7 +105,7 @@ spec: configMap: name: {{ template "datadog.fullname" . }}-checksd {{- end }} - {{- if .Values.datadog.logsEnabled }} + {{- if or .Values.datadog.logs.enabled .Values.datadog.logsEnabled }} - hostPath: path: "/var/lib/datadog-agent/logs" name: pointerdir @@ -127,7 +127,7 @@ spec: - name: sysprobe-config configMap: name: {{ template "datadog.fullname" . }}-system-probe-config - {{- if eq .Values.systemProbe.seccomp "localhost/system-probe" }} + {{- if eq .Values.datadog.systemProbe.seccomp "localhost/system-probe" }} - name: datadog-agent-security configMap: name: {{ template "datadog.fullname" . }}-security diff --git a/stable/datadog/templates/system-probe-init.yaml b/stable/datadog/templates/system-probe-init.yaml index 23506b71dc4f..7a1205b3e98b 100644 --- a/stable/datadog/templates/system-probe-init.yaml +++ b/stable/datadog/templates/system-probe-init.yaml @@ -1,6 +1,6 @@ {{- define "system-probe-init" -}} - name: seccomp-setup - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.agents.image.repository }}:{{ .Values.agents.image.tag }}" command: - cp - /etc/config/system-probe-seccomp.json diff --git a/stable/datadog/values.yaml b/stable/datadog/values.yaml index 6350c69183e6..6ffda7a8e30b 100644 --- a/stable/datadog/values.yaml +++ b/stable/datadog/values.yaml @@ -189,6 +189,22 @@ datadog: # # leaderLeaseDuration: 60 + ## @param logs - object - required + ## Enable logs agent and provide custom configs + # + logs: + ## @param enabled - boolean - optional - default: false + ## Enables this to activate Datadog Agent log collection. + ## ref: https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/#log-collection-setup + # + enabled: false + + ## @param containerCollectAll - boolean - optional - default: false + ## Enable this to allow log collection for all containers. + ## ref: https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/#log-collection-setup + # + # containerCollectAll: false + ## @param logsEnabled - boolean - optional - default: false ## Enables this to activate Datadog Agent log collection. ## ref: https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/#log-collection-setup