Skip to content

[BUG] Add providers.aks.enabled to DatadogAgent CRD spec #2746

@atrepca

Description

@atrepca

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 schema

This 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

  1. Install the Datadog Operator via Helm:
helm install datadog-operator datadog/datadog-operator --version 2.17.0
  1. Deploy a DatadogAgent resource with providers.aks.enabled set under global:
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
  namespace: datadog
spec:
  global:
    providers:
      aks:
        enabled: true
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpending

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions