Skip to content

Commit

Permalink
[stable/datadog][v2.0.1] improve logs fields (helm#21086)
Browse files Browse the repository at this point in the history
Co-Authored-By: Vincent Boulineau <58430298+vboulineau@users.noreply.github.com>
Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>

Co-authored-by: Vincent Boulineau <58430298+vboulineau@users.noreply.github.com>
  • Loading branch information
2 people authored and includerandom committed Jul 19, 2020
1 parent 0cea60d commit ecf3953
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 15 deletions.
5 changes: 5 additions & 0 deletions stable/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion stable/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 2.0.0
version: 2.0.1
appVersion: "7"
description: DataDog Agent
keywords:
Expand Down
8 changes: 4 additions & 4 deletions stable/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -265,8 +265,8 @@ helm install --name <RELEASE_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` |
Expand Down
2 changes: 2 additions & 0 deletions stable/datadog/docs/Migration_1.x_to_2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` | |
2 changes: 2 additions & 0 deletions stable/datadog/templates/cluster-agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions stable/datadog/templates/container-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions stable/datadog/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion stable/datadog/templates/system-probe-init.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 16 additions & 0 deletions stable/datadog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ecf3953

Please sign in to comment.