Skip to content

Commit

Permalink
feat(datadog): Add providers.talos.enabled option
Browse files Browse the repository at this point in the history
  • Loading branch information
clamoriniere committed Nov 21, 2024
1 parent eab003d commit 282dae8
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## 3.82.0

* Added the configuration value `datadog.disablePasswdMount` to disable mounting the `/etc/passwd` path from the host filesystem. This option should be used when the underlying OS does not have these files (e.g., Talos OS).

* Added the configuration value `datadog.disableDefaultOsReleasePaths` to disable mounting the default "os-release" file paths from the host filesystem (e.g., `/etc/redhat-release`, `/etc/fedora-release`, etc.). Note that this change does not affect the `datadog.osReleasePath` option. To avoid mounting the `/etc/os-release` host path, set the `datadog.osReleasePath` configuration value to an empty string. This option should be used when the underlying OS does not have these files (e.g., Talos OS).
* Add `providers.talos.enabled` to simplify agent deployment configuration on Talos OS.

## 3.81.0

Expand Down
1 change: 1 addition & 0 deletions charts/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ helm install <RELEASE_NAME> \
| providers.gke.autopilot | bool | `false` | Enables Datadog Agent deployment on GKE Autopilot |
| providers.gke.cos | bool | `false` | Enables Datadog Agent deployment on GKE with Container-Optimized OS (COS) |
| providers.gke.gdc | bool | `false` | Enables Datadog Agent deployment on GKE on Google Distributed Cloud (GDC) |
| providers.talos.enabled | bool | `false` | Activate all specificities related to Talos.dev configuration. Required as currently we cannot auto-detect Talos.dev. |
| registry | string | `nil` | Registry to use for all Agent images (default to [gcr.io | eu.gcr.io | asia.gcr.io | datadoghq.azurecr.io | public.ecr.aws/datadog] depending on datadog.site value) |
| remoteConfiguration.enabled | bool | `true` | Set to true to enable remote configuration on the Cluster Agent (if set) and the node agent. Can be overridden if `datadog.remoteConfiguration.enabled` Preferred way to enable Remote Configuration. |
| targetSystem | string | `"linux"` | Target OS for this deployment (possible values: linux, windows) |
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/ci/disable-defaultosreleasepath-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"
disableDefaultOsReleasePaths: true
disableDefaultOsReleasePaths: true
8 changes: 8 additions & 0 deletions charts/datadog/ci/provider-talos-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"

providers:
talos:
enabled: true
2 changes: 2 additions & 0 deletions charts/datadog/templates/_container-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@
- name: host-rpm-dir
mountPath: /host/var/lib/rpm
readOnly: true
{{- if eq (include "should-add-host-path-for-os-release-paths" .) "true" }}
{{- if ne .Values.datadog.osReleasePath "/etc/redhat-release" }}
- name: etc-redhat-release
mountPath: /host/etc/redhat-release
Expand All @@ -324,6 +325,7 @@
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if eq .Values.targetSystem "windows" }}
{{- if or .Values.datadog.logs.enabled .Values.datadog.logsEnabled }}
- name: pointerdir
Expand Down
6 changes: 5 additions & 1 deletion charts/datadog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ false
Returns whether Remote Configuration should be enabled in the agent
*/}}
{{- define "datadog-remoteConfiguration-enabled" -}}
{{- if and (.Values.remoteConfiguration.enabled) (.Values.datadog.remoteConfiguration.enabled) (not .Values.providers.gke.gdc ) -}}
{{- if and (.Values.remoteConfiguration.enabled) (.Values.datadog.remoteConfiguration.enabled) (not .Values.providers.gke.gdc) -}}
true
{{- else -}}
false
Expand Down Expand Up @@ -1053,6 +1053,8 @@ Create RBACs for custom resources
{{- define "should-add-host-path-for-os-release-paths" -}}
{{- if ne .Values.targetSystem "linux" -}}
false
{{- else if .Values.providers.talos.enabled -}}
false
{{- else if (and .Values.datadog.systemProbe.enableDefaultOsReleasePaths (not .Values.datadog.disableDefaultOsReleasePaths)) -}}
true
{{- else -}}
Expand All @@ -1067,6 +1069,8 @@ Create RBACs for custom resources
{{- define "should-add-host-path-for-etc-passwd" -}}
{{- if ne .Values.targetSystem "linux" -}}
false
{{- else if .Values.providers.talos.enabled -}}
false
{{- else if not .Values.datadog.disablePasswdMount -}}
true
{{- else -}}
Expand Down
4 changes: 4 additions & 0 deletions charts/datadog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2314,6 +2314,10 @@ providers:
# providers.aks.enabled -- Activate all specificities related to AKS configuration. Required as currently we cannot auto-detect AKS.
enabled: false

talos:
# providers.talos.enabled -- Activate all specificities related to Talos.dev configuration. Required as currently we cannot auto-detect Talos.dev.
enabled: false

remoteConfiguration:
# remoteConfiguration.enabled -- Set to true to enable remote configuration on the Cluster Agent (if set) and the node agent.
# Can be overridden if `datadog.remoteConfiguration.enabled`
Expand Down

0 comments on commit 282dae8

Please sign in to comment.