[datadog-operator] Expose DCA Agent Sidecar TLS Config#2700
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2700 +/- ##
==========================================
+ Coverage 39.23% 39.70% +0.47%
==========================================
Files 314 314
Lines 27296 27698 +402
==========================================
+ Hits 10709 10998 +289
- Misses 15798 15899 +101
- Partials 789 801 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
For documentation styleguide reasons, can we capitalize |
30d0938 to
456c360
Compare
| f.agentSidecarConfig.tlsVerificationEnabled = apiutils.BoolValue(sidecarConfig.ClusterAgentTLSVerification.Enabled) | ||
| } | ||
| if sidecarConfig.ClusterAgentTLSVerification.CopyCaConfigMap != nil { | ||
| f.agentSidecarConfig.tlsVerificationCopyCaConfigMap = apiutils.BoolValue(sidecarConfig.ClusterAgentTLSVerification.CopyCaConfigMap) |
There was a problem hiding this comment.
should we set this (and pass env var to DCA) even if ClusterAgentTLSVerification.Enabled == false?
There was a problem hiding this comment.
would be nice to have unit test confirming expected behavior.
There was a problem hiding this comment.
I can add a unit test for this to confirm that the values are being set properly.
But I think it should be fine to pass the envvar to DCA even if it's explicitly set to false on the Operator. Generally, I think this should be good to do because Agent defaults can change and I'd want a manually defined false by the Operator user to still apply.
Previously the sidecar TLS verification env vars were only set when enabled=true. This changes the fields to *bool so the env vars are always passed to DCA when explicitly configured, even when false, preventing Agent default changes from overriding user intent. Adds unit tests for both enabled and explicitly disabled cases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
c90240e to
4125b4a
Compare
What does this PR do?
Expose config option + creates RBACs for creating and mounting the cluster agent's certificate onto agent sidecar container it creates in application namespaces.
Motivation
Expose config option for new Agent feature for TLS communication on agent sidecar in admission controller
Minimum Agent Versions
This feature works only with newer Agent versions. However, the configmap rbac is fine to be applied everywhere.
Describe your test plan
Apply the following agent crd config
Check that the configmaps rbacs are present on the dca role
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel