-
Notifications
You must be signed in to change notification settings - Fork 146
[BUG] Add providers.aks.enabled to DatadogAgent CRD spec #2746
Description
Pre-submission Checklist
- I have searched existing issues and this is not a duplicate
- This is a Datadog Operator issue (CRDs, reconciliation, etc.), not a Datadog Agent or Datadog service problem (dashboards, monitors, etc.)
Operator version
1.22.0
Operator Helm chart version
2.17.0
Bug Report
What happened:
When using global.providers.aks.enabled: true in the DatadogAgent CRD spec, the Helm deploy fails with the following error:
DatadogAgent/datadog/datadog dry-run failed: failed to create typed patch object (datadog/datadog; datadoghq.com/v2alpha1, Kind=DatadogAgent): .spec.global.providers: field not declared in schemaThis is confirmed by the operator's Helm-to-CRD mapping here mapping_datadog_helm_to_datadogagent_crd.yaml, where the field not mapped:
providers.aks.enabled: ""What I expected:
The DatadogAgent CRD should expose a providers.aks.enabled field equivalent to the one in the Datadog Helm chart (DataDog/helm-charts), which handles this by translating to the DD_ADMISSION_CONTROLLER_ADD_AKS_SELECTORS env var automatically.
Steps to Reproduce
- Install the Datadog Operator via Helm:
helm install datadog-operator datadog/datadog-operator --version 2.17.0- Deploy a DatadogAgent resource with
providers.aks.enabledset under global:
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
name: datadog
namespace: datadog
spec:
global:
providers:
aks:
enabled: true- Observe the dry-run validation failure.
Environment
Kubernetes version: v1.33.7 (AKS)
Helm version: v4.1.0
Cloud provider: Azure
Additional Context
The official Datadog Kubernetes documentation here , the AKS section, shows providers.aks.enabled as a valid configuration option but only provides the Helm chart example. The operator example uses the manual env var approach instead, but this distinction is not called out clearly, making it easy to assume the field works for both deployments.