Skip to content

Operator manifest renderer#2947

Merged
levan-m merged 6 commits into
mainfrom
levan-m/operator-render
Jun 3, 2026
Merged

Operator manifest renderer#2947
levan-m merged 6 commits into
mainfrom
levan-m/operator-render

Conversation

@levan-m
Copy link
Copy Markdown
Collaborator

@levan-m levan-m commented Apr 27, 2026

What does this PR do?

Offline renderer to generate k8s manifests from DDA, DAP custom resources without running a cluster.

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

see the README.md in the diff.

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)

Copy link
Copy Markdown

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

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: a1adbe6a4d

ℹ️ 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".

Comment thread cmd/operator-render/main.go Outdated
DDAFile: ddaFile,
DAPFiles: dapFiles,
SupportCilium: supportCilium,
ProfileEnabled: len(dapFiles) > 0,
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 Enable profile mode independently from --dap inputs

ProfileEnabled is currently tied to len(dapFiles) > 0, which means the renderer cannot reproduce clusters where DatadogAgentProfileEnabled is on but no DatadogAgentProfile resources exist. In the real reconciler, that flag still triggers profile reconciliation and applies the default profile path (which adjusts node-agent scheduling overrides), so this shortcut yields different manifests for profile-enabled deployments and can produce incorrect golden baselines even when users intentionally render with zero DAP files.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

stale

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 27, 2026

Codecov Report

❌ Patch coverage is 49.65035% with 144 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.91%. Comparing base (bd0f5e2) to head (3fd11c7).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
cmd/operator-render/main.go 0.00% 53 Missing ⚠️
internal/controller/testutils/renderer/renderer.go 57.95% 21 Missing and 16 partials ⚠️
internal/controller/testutils/renderer/output.go 62.29% 18 Missing and 5 partials ⚠️
internal/controller/testutils/renderer/collect.go 56.25% 7 Missing and 7 partials ⚠️
internal/controller/testutils/renderer/load.go 47.82% 6 Missing and 6 partials ⚠️
internal/controller/testutils/renderer/sort.go 82.75% 3 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2947      +/-   ##
==========================================
+ Coverage   42.90%   43.91%   +1.01%     
==========================================
  Files         341      349       +8     
  Lines       29403    30529    +1126     
==========================================
+ Hits        12614    13408     +794     
- Misses      15965    16230     +265     
- Partials      824      891      +67     
Flag Coverage Δ
unittests 43.91% <49.65%> (+1.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/controller/testutils/renderer/sort.go 82.75% <82.75%> (ø)
internal/controller/testutils/renderer/load.go 47.82% <47.82%> (ø)
internal/controller/testutils/renderer/collect.go 56.25% <56.25%> (ø)
internal/controller/testutils/renderer/output.go 62.29% <62.29%> (ø)
internal/controller/testutils/renderer/renderer.go 57.95% <57.95%> (ø)
cmd/operator-render/main.go 0.00% <0.00%> (ø)

... and 16 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd0f5e2...3fd11c7. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented Apr 27, 2026

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: 47.58% (threshold: 80.00%)

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 47.58%
Overall Coverage: 44.23% (+0.99%)

Useful? React with 👍 / 👎

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

@drichards-87 drichards-87 self-assigned this Apr 27, 2026
@drichards-87 drichards-87 removed their assignment Apr 27, 2026
Copy link
Copy Markdown
Member

@tbavelier tbavelier left a comment

Choose a reason for hiding this comment

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

LGTM. works, will be great for Agent loops / quickly test. Some unit tests would be nice, but nit

@levan-m levan-m merged commit 19c5d3f into main Jun 3, 2026
29 of 38 checks passed
@levan-m levan-m deleted the levan-m/operator-render branch June 3, 2026 21:31
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.

4 participants