Skip to content

[renderer] support controller log, CRD status outputs and configurable k8s version #3211

Merged
levan-m merged 3 commits into
mainfrom
levan/operator-render-improvements
Jul 7, 2026
Merged

[renderer] support controller log, CRD status outputs and configurable k8s version #3211
levan-m merged 3 commits into
mainfrom
levan/operator-render-improvements

Conversation

@levan-m

@levan-m levan-m commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

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
  • pin image tag in golden file to avoid failures on default update.

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?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

Run below commands and verify debug.log container controller logs and manifests.yaml includes status for DDA, DAPs.

make build-renderer
./bin/linux-x86_64/operator-render --dda datadog-agent.yaml --dap datadog-profile.yaml --profiles-enabled=true --log-level debug > manifests.yaml 2>workdir/debug.log

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed (see: signing commits)

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]>
@levan-m levan-m added this to the v1.29.0 milestone Jul 1, 2026
@levan-m
levan-m requested a review from a team July 1, 2026 20:51
@levan-m
levan-m requested a review from a team as a code owner July 1, 2026 20:51
@levan-m levan-m added enhancement New feature or request qa/skip-qa labels Jul 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@jeff-morgan-dd jeff-morgan-dd self-assigned this Jul 1, 2026
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jul 1, 2026

Copy link
Copy Markdown

Code Coverage

Fix all issues with BitsAI

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Patch coverage percentage gate may be blocking this PR.

Patch coverage: 42.00% (threshold: 80.00%)

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 42.00%
Overall Coverage: 46.27% (-0.02%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8ebc371 | Docs | Datadog PR Page | Give us feedback!

@levan-m
levan-m merged commit 194f686 into main Jul 7, 2026
29 of 38 checks passed
@levan-m
levan-m deleted the levan/operator-render-improvements branch July 7, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants