[renderer] support controller log, CRD status outputs and configurable k8s version #3211
Conversation
Make the offline renderer behave like a real cluster and support multi-reconcile convergence: - set a modern Kubernetes server version (default v1.28.0) so version-gated resources (e.g. the node Agent local Service, gated on k8s >= 1.22) render as they would on a real cluster; add a --kubernetes-version flag to override it - iterate the DDAI reconcilers to a fixed point so shared resources that converge over multiple reconciles are captured before output is collected - register the DatadogAgentProfile status subresource so reconciler-set profile status is observable in the rendered output - adjust the e2e golden expectations for the now-rendered local Service Environment: Datadog workspace Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 828df964c0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| for i := range iterList.Items { | ||
| ddai := &iterList.Items[i] | ||
| if _, rErr := ddaiReconciler.Reconcile(ctx, ddai); rErr != nil { | ||
| log.V(1).Info("DDAI reconcile returned an error (will retry until convergence)", "ddai", ddai.Name, "error", rErr.Error()) |
There was a problem hiding this comment.
Return unrecovered DDAI reconcile errors
When a DDAI reconcile fails for a real render error (for example feature dependency validation such as an invalid OTLP endpoint or mutually exclusive APM instrumentation namespace lists), this path now only logs at V(1) and continues. In normal operator-render runs (--log-level none, and even info for this debug-level log), the CLI exits 0 with partial resources once the Service convergence key stabilizes, instead of failing as it did before; please only suppress the expected profile conflict cases or return any last unrecovered reconcile error.
Useful? React with 👍 / 👎.
🛑 Gate Violations
ℹ️ Info🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 8ebc371 | Docs | Datadog PR Page | Give us feedback! |
Make the offline renderer behave like a real cluster and support multi-reconcile convergence:
Environment: Datadog workspace
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
Run below commands and verify debug.log container controller logs and manifests.yaml includes status for DDA, DAPs.
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel