diff --git a/charts/datadog/CHANGELOG.md b/charts/datadog/CHANGELOG.md index f68abe996..652e101b2 100644 --- a/charts/datadog/CHANGELOG.md +++ b/charts/datadog/CHANGELOG.md @@ -1,5 +1,9 @@ # Datadog changelog +## 3.89.0 + +* Add `clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus` to disable `use_component_status` option for kubernetes_apiserver check. + ## 3.88.1 * Disable SBOM monitoring features for GKE Autopilot, as they are not supported diff --git a/charts/datadog/Chart.yaml b/charts/datadog/Chart.yaml index efb7731a7..ab25da7a9 100644 --- a/charts/datadog/Chart.yaml +++ b/charts/datadog/Chart.yaml @@ -1,7 +1,7 @@ --- apiVersion: v1 name: datadog -version: 3.88.1 +version: 3.89.0 appVersion: "7" description: Datadog Agent keywords: diff --git a/charts/datadog/README.md b/charts/datadog/README.md index 7a23574f9..20dc1e3b7 100644 --- a/charts/datadog/README.md +++ b/charts/datadog/README.md @@ -1,6 +1,6 @@ # Datadog -![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) +![Version: 3.89.0](https://img.shields.io/badge/Version-3.89.0-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/). @@ -608,6 +608,7 @@ helm install \ | clusterAgent.image.pullSecrets | list | `[]` | Cluster Agent repository pullSecret (ex: specify docker registry credentials) | | clusterAgent.image.repository | string | `nil` | Override default registry + image.name for Cluster Agent | | clusterAgent.image.tag | string | `"7.61.0"` | Cluster Agent image tag to use | +| clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus | bool | `false` | Set this to true to disable use_component_status for the kube_apiserver integration. | | clusterAgent.livenessProbe | object | Every 15s / 6 KO / 1 OK | Override default Cluster Agent liveness probe settings | | clusterAgent.metricsProvider.aggregator | string | `"avg"` | Define the aggregator the cluster agent will use to process the metrics. The options are (avg, min, max, sum) | | clusterAgent.metricsProvider.createReaderRbac | bool | `true` | Create `external-metrics-reader` RBAC automatically (to allow HPA to read data from Cluster Agent) | diff --git a/charts/datadog/templates/_helpers.tpl b/charts/datadog/templates/_helpers.tpl index e372dd9a5..de9ca34f6 100644 --- a/charts/datadog/templates/_helpers.tpl +++ b/charts/datadog/templates/_helpers.tpl @@ -699,7 +699,18 @@ Return Kubelet volumeMount Return true if the Cluster Agent needs a confd configmap */}} {{- define "need-cluster-agent-confd" -}} -{{- if (or (.Values.clusterAgent.confd) (.Values.datadog.kubeStateMetricsCore.enabled) (.Values.clusterAgent.advancedConfd) (.Values.datadog.helmCheck.enabled)) -}} +{{- if (or (.Values.clusterAgent.confd) (.Values.datadog.kubeStateMetricsCore.enabled) (.Values.clusterAgent.advancedConfd) (.Values.datadog.helmCheck.enabled) (.Values.datadog.collectEvents) (.Values.clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus)) -}} +true +{{- else -}} +false +{{- end -}} +{{- end -}} + +{{/* +Return true if kubernetes_apiserver check should be configured +*/}} +{{- define "need-kubernetes-apiserver-check-config" -}} +{{- if or (.Values.datadog.collectEvents) (.Values.clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus) -}} true {{- else -}} false diff --git a/charts/datadog/templates/_kubernetes_apiserver_config.yaml b/charts/datadog/templates/_kubernetes_apiserver_config.yaml index 208e21594..b1849c6d0 100644 --- a/charts/datadog/templates/_kubernetes_apiserver_config.yaml +++ b/charts/datadog/templates/_kubernetes_apiserver_config.yaml @@ -1,13 +1,19 @@ {{- define "kubernetes_apiserver-config" -}} -{{- if .Values.datadog.collectEvents -}} +{{- if eq (include "need-kubernetes-apiserver-check-config" .) "true" }} kubernetes_apiserver.yaml: |- init_config: instances: - - filtering_enabled: {{ .Values.datadog.kubernetesEvents.filteringEnabled }} + - +{{- if .Values.datadog.collectEvents }} + filtering_enabled: {{ .Values.datadog.kubernetesEvents.filteringEnabled }} unbundle_events: {{ .Values.datadog.kubernetesEvents.unbundleEvents }} {{- if .Values.datadog.kubernetesEvents.unbundleEvents }} collected_event_types: {{ .Values.datadog.kubernetesEvents.collectedEventTypes | toYaml | nindent 8 }} {{- end -}} +{{- end }} +{{- if .Values.clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus }} + use_component_status: false +{{- end }} {{- end -}} {{- end -}} diff --git a/charts/datadog/templates/cluster-agent-deployment.yaml b/charts/datadog/templates/cluster-agent-deployment.yaml index 08925e9b0..de82b3615 100644 --- a/charts/datadog/templates/cluster-agent-deployment.yaml +++ b/charts/datadog/templates/cluster-agent-deployment.yaml @@ -486,7 +486,7 @@ spec: - key: helm.yaml path: helm.yaml {{- end }} -{{- if .Values.datadog.collectEvents }} +{{- if eq (include "need-kubernetes-apiserver-check-config" .) "true" }} - key: kubernetes_apiserver.yaml path: kubernetes_apiserver.yaml {{- end }} diff --git a/charts/datadog/values.yaml b/charts/datadog/values.yaml index c42ff51cd..c87513dbd 100644 --- a/charts/datadog/values.yaml +++ b/charts/datadog/values.yaml @@ -1310,6 +1310,11 @@ clusterAgent: # username: datadog # password: + ## clusterAgent.kubernetesApiserverCheck -- correspond to options for configuring the kube_apiserver integration. + kubernetesApiserverCheck: + # clusterAgent.kubernetesApiserverCheck.disableUseComponentStatus -- Set this to true to disable use_component_status for the kube_apiserver integration. + disableUseComponentStatus: false + # clusterAgent.resources -- Datadog cluster-agent resource requests and limits. resources: {} # requests: