datadog-operator icon indicating copy to clipboard operation
datadog-operator copied to clipboard

add metadata forwarder

Open celenechang opened this issue 7 months ago • 1 comments

What does this PR do?

Adds metadata forwarder in the Operator.

This runs outside of the controllers, but can fallback to grab DatadogAgent credentials if they are not set in the Operator deployment.

Motivation

Add DatadogOperator metadata in REDAPL

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

  • [ ] works with operator credentials, cluster name set
  • [ ] works with operator credentials, changing one of the flags (genericresource)
  • [ ] works with operator credentials, cluster name not set
  • [ ] works with datadogagent credentials, no operator credentials
  • [ ] check behavior if operator credentials are set and there is no DDA
  • [ ] check behavior if operator credentials are not set and there is no DDA

Checklist

  • [X] PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • [X] PR has a milestone or the qa/skip-qa label

celenechang avatar Jun 20 '25 15:06 celenechang

Codecov Report

Attention: Patch coverage is 0.35461% with 281 lines in your changes missing coverage. Please review.

Project coverage is 45.82%. Comparing base (047cda4) to head (9fbc4e1).

Files with missing lines Patch % Lines
...kg/controller/utils/metadata/metadata_forwarder.go 0.00% 217 Missing :warning:
cmd/main.go 0.00% 61 Missing :warning:
pkg/version/version.go 0.00% 2 Missing :warning:
...adogagent/component/clusterchecksrunner/default.go 0.00% 1 Missing :warning:

:x: Your patch status has failed because the patch coverage (0.35%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1999      +/-   ##
==========================================
- Coverage   46.33%   45.82%   -0.52%     
==========================================
  Files         248      249       +1     
  Lines       24800    25051     +251     
==========================================
- Hits        11491    11479      -12     
- Misses      12724    12992     +268     
+ Partials      585      580       -5     
Flag Coverage Δ
unittests 45.82% <0.35%> (-0.52%) :arrow_down:

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

Files with missing lines Coverage Δ
internal/controller/setup.go 31.96% <100.00%> (-0.97%) :arrow_down:
...adogagent/component/clusterchecksrunner/default.go 8.78% <0.00%> (ø)
pkg/version/version.go 0.00% <0.00%> (ø)
cmd/main.go 0.00% <0.00%> (ø)
...kg/controller/utils/metadata/metadata_forwarder.go 0.00% <0.00%> (ø)

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 047cda4...9fbc4e1. Read the comment docs.

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

codecov-commenter avatar Jun 20 '25 15:06 codecov-commenter