[CONTP-2023] Improve DatadogMonitor reconciliation at scale - #3381
[CONTP-2023] Improve DatadogMonitor reconciliation at scale#3381tbavelier wants to merge 4 commits into
Conversation
f9b8943 to
33664a7
Compare
🛑 Gate Violations
ℹ️ Info🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 5779096 | Docs | View more details | Give us feedback! |
33664a7 to
af9c7d5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af9c7d5002
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What does this PR do?
Motivation
Large monitor collections can accumulate polling work and delay lifecycle operations.
Warning
For large DatadogMonitor fleets, we recommend disabling direct operator telemetry with
--operatorMetricsEnabled=false(DD_OPERATOR_METRICS_ENABLED=false) for better performance. When enabled (default), every DatadogMonitor starts one metrics-forwarder goroutine.Reconciliation and Kubernetes Events continue to work, but direct Datadog operator metrics
datadog.operator.reconcile.success,datadog.operator.<resource>.custom_resource.count, etc.) and events for DatadogAgent, DatadogAgentInternal, and DatadogMonitor resources are disabled. THESE DO NOT AFFECT Agent telemetry, this is purely self-telemetry from the operatorIf operator own telemetry must remain enabled, raise the
--maximumGoroutines(DD_MAXIMUM_GOROUTINES) health-check threshold above the expected total goroutine count; its default is 500 and it is not a runtime goroutine limit.QA
Manual scale and priority check:
--datadogMonitorMaxConcurrentReconciles=10(as well asoperatorMetricsEnabled=falseormaximumGoroutines=10000)--datadogMonitorMaxConcurrentReconciles=1to accumulate scheduled status-polling work.DatadogMonitor bulk load helper
The full batch is sent through one
kubectl createorkubectl deleteinvocation.