Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable SBOM monitoring features for GKE Autopilot #1666

Merged
merged 5 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Datadog changelog

## 3.88.1

* Disable SBOM monitoring features for GKE Autopilot, as they are not supported

## 3.88.0

* Set default `Agent` and `Cluster-Agent` version to `7.61.0`.
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v1
name: datadog
version: 3.88.0
version: 3.88.1
appVersion: "7"
description: Datadog Agent
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Datadog

![Version: 3.88.0](https://img.shields.io/badge/Version-3.88.0-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)
![Version: 3.88.1](https://img.shields.io/badge/Version-3.88.1-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)

[Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform. This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/).

Expand Down
16 changes: 15 additions & 1 deletion charts/datadog/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,20 @@ The option is overriden to avoid mounting volumes that are not allowed which wou

{{- end }}

{{- if or .Values.providers.gke.autopilot .Values.providers.gke.gdc }}

{{- if or .Values.datadog.sbom.containerImage.enabled .Values.datadog.sbom.host.enabled }}

#######################################################################################
#### WARNING: SBOM Monitoring is not supported on GKE Autopilot ####
#######################################################################################

On GKE Autopilot environments, SBOM Monitoring is not supported. The options 'datadog.sbom.containerImage.enabled' and 'datadog.sbom.host.enabled' must be set to 'false'.

{{- end }}

{{- end }}

{{- if and (.Values.datadog.dogstatsd.useSocketVolume) (eq .Values.targetSystem "windows") }}

###################################################################################
Expand Down Expand Up @@ -534,7 +548,7 @@ More information about this change: https://github.com/DataDog/helm-charts/pull/
{{- end }}


{{- if and (eq .Values.targetSystem "linux") (eq .Values.datadog.osReleasePath "") (eq (include "should-add-host-path-for-os-release-paths" .) "false") .Values.datadog.sbom.host.enabled }}
{{- if and (eq .Values.targetSystem "linux") (eq .Values.datadog.osReleasePath "") (eq (include "should-add-host-path-for-os-release-paths" .) "false") (eq (include "should-enable-sbom-host-fs-collection" .) "true") }}
#################################################################
#### ERROR: Configuration notice ####
#################################################################
Expand Down
6 changes: 3 additions & 3 deletions charts/datadog/templates/_container-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
- name: DD_CONTAINER_IMAGE_ENABLED
value: "true"
{{- end }}
{{- if or .Values.datadog.sbom.host.enabled (eq (include "should-enable-sbom-container-image-collection" .) "true") }}
{{- if or (eq (include "should-enable-sbom-host-fs-collection" .) "true") (eq (include "should-enable-sbom-container-image-collection" .) "true") }}
- name: DD_SBOM_ENABLED
value: "true"
{{- if eq (include "should-enable-sbom-container-image-collection" .) "true" }}
Expand All @@ -188,7 +188,7 @@
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.datadog.sbom.host.enabled }}
{{- if eq (include "should-enable-sbom-host-fs-collection" .) "true" }}
- name: DD_SBOM_HOST_ENABLED
value: "true"
- name: HOST_ROOT
Expand Down Expand Up @@ -292,7 +292,7 @@
mountPath: /host/var/lib/docker
readOnly: true
{{- end }}
{{- if .Values.datadog.sbom.host.enabled }}
{{- if eq (include "should-enable-sbom-host-fs-collection" .) "true" }}
- name: host-apk-dir
mountPath: /host/var/lib/apk
readOnly: true
Expand Down
4 changes: 2 additions & 2 deletions charts/datadog/templates/_daemonset-volumes-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
path: {{ .Values.datadog.systemProbe.osReleasePath | default .Values.datadog.osReleasePath }}
name: os-release-file
{{- end }}
{{- if and (eq (include "should-add-host-path-for-os-release-paths" .) "true") (or (eq (include "should-enable-system-probe" .) "true") .Values.datadog.sbom.host.enabled) }}
{{- if and (eq (include "should-add-host-path-for-os-release-paths" .) "true") (or (eq (include "should-enable-system-probe" .) "true") (eq (include "should-enable-sbom-host-fs-collection" .) "true")) }}
- hostPath:
path: /etc/redhat-release
name: etc-redhat-release
Expand Down Expand Up @@ -161,7 +161,7 @@
path: /var/lib/docker
name: host-docker-dir
{{- end }}
{{- if .Values.datadog.sbom.host.enabled }}
{{- if eq (include "should-enable-sbom-host-fs-collection" .) "true" }}
- hostPath:
path: /var/lib/apk
name: host-apk-dir
Expand Down
13 changes: 12 additions & 1 deletion charts/datadog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ Create RBACs for custom resources
Return true if SBOM collection for container image is enabled
*/}}
{{- define "should-enable-sbom-container-image-collection" -}}
{{- if .Values.datadog.sbom.containerImage.enabled -}}
{{- if and (.Values.datadog.sbom.containerImage.enabled) (not (or .Values.providers.gke.autopilot .Values.providers.gke.gdc)) -}}
{{- if not (eq (include "should-enable-container-image-collection" .) "true") -}}
{{- fail "Container runtime support has to be enabled for SBOM collection to work. Please enable it using `datadog.containerRuntimeSupport.enabled`." -}}
{{- end -}}
Expand All @@ -964,6 +964,17 @@ Create RBACs for custom resources
{{- end -}}
{{- end -}}

{{/*
Return true if SBOM collection for host filesystems is enabled
*/}}
{{- define "should-enable-sbom-host-fs-collection" -}}
{{- if and (.Values.datadog.sbom.host.enabled) (not (or .Values.providers.gke.autopilot .Values.providers.gke.gdc)) -}}
true
{{- else -}}
false
{{- end -}}
{{- end -}}

{{/*
Return true if language detection feature is enabled
*/}}
Expand Down
Loading