[CECO-2029][DatadogAgentInternal] Setup dependencies with real owner while using copy for naming
What does this PR do?
- Provides a store option to use a different object than the owner to get labels/annotations, while still setting ownerref to the provided owner
- Uses this option solely in the DDAI controller to use the profile DDAI copy (that's using the DDA name) for labels/annotations while still setting the ownerref to an existing/real object
Motivation
- Avoid creating dependencies with non-existing object in ownerref causing it to be GCd: this would happen when using profiles and DDAI
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
Write there any instructions and details you may have to test your PR.
Checklist
- [ ] PR has at least one valid label:
bug,enhancement,refactoring,documentation,tooling, and/ordependencies - [ ] PR has a milestone or the
qa/skip-qalabel
Codecov Report
Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.
Project coverage is 45.65%. Comparing base (
d77c8c4) to head (f7dda11). Report is 1 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...er/datadogagentinternal/controller_reconcile_v2.go | 0.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #2011 +/- ##
==========================================
+ Coverage 45.20% 45.65% +0.45%
==========================================
Files 271 271
Lines 28025 28245 +220
==========================================
+ Hits 12669 12896 +227
+ Misses 14697 14690 -7
Partials 659 659
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 45.65% <94.73%> (+0.45%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| internal/controller/datadogagent/store/store.go | 70.94% <100.00%> (+5.70%) |
:arrow_up: |
| ...ogagentinternal/controller_reconcile_v2_helpers.go | 28.94% <100.00%> (+0.94%) |
:arrow_up: |
| ...er/datadogagentinternal/controller_reconcile_v2.go | 0.00% <0.00%> (ø) |
... and 3 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 dataPowered by Codecov. Last update d77c8c4...f7dda11. 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.
Closing in favour of https://github.com/DataDog/datadog-operator/pull/2014