DataDog / helm-charts

Helm charts for Datadog products
Apache License 2.0
343 stars 1.01k forks source link

[datadog] Change admissionController.configMode resolution path #1367

Open bkalcho opened 5 months ago

bkalcho commented 5 months ago

What this PR does / why we need it:

This PR ensures seamless migration from charts 3.21.0 and earlier by maintaining unchanged logic for resolution clusterAgent.admissionController.configMode.

Previously, the resolution path was:

    ## If clusterAgent.admissionController.configMode is not set:
    ##   * and datadog.apm.socketEnabled is true, the Admission Controller uses socket.
    ##   * and datadog.apm.portEnabled is true, the Admission Controller uses hostip.
    ##   * Otherwise, the Admission Controller defaults to hostip.

With this PR, the resolution path will be updated to:

    ## If clusterAgent.admissionController.configMode is not set:
    ##   * and datadog.apm.portEnabled is true, the Admission Controller uses hostip.
    ##   * and datadog.apm.socketEnabled is true, the Admission Controller uses socket.
    ##   * Otherwise, the Admission Controller defaults to hostip.

This change aligns with the logic present in chart version 3.21.0 and addresses an issue (https://github.com/DataDog/datadog-agent/issues/16710) where undocumented logic led to deployment issues, especially during migrations from chart versions before 3.22.0.

Which issue this PR fixes

Special notes for your reviewer:

This changes needs to be propagated until and including chart versions 3.22.0.

Checklist