Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Orch] Add CRD RC handler (#1340) #1479

Merged
merged 2 commits into from
Oct 22, 2024
Merged

[Orch] Add CRD RC handler (#1340) #1479

merged 2 commits into from
Oct 22, 2024

Conversation

levan-m
Copy link
Contributor

@levan-m levan-m commented Oct 22, 2024

Cherry-pick #1340


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

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/or dependencies
  • PR has a milestone or the qa/skip-qa label

* [Orch] Add CRD RC handler

* Remove print statement

* Refactor to separate file

* Move last function

* Use CRD specific status

* Add cluster agent config to RC

* Correctly set product

* Fix product and add logging

* Add fixes for crd nil pointers

* Revert accidental commit

* Update dependencies and add tag getter function

* Go.mod change

* Reset go.mod

* Update remoteconfig/state

* Fix updater package and work sum

* Clean up logs and force restart of DCA on CR changes

* Add a lock around get and update of DDA

* Improve comments and change test to use orchexp for annotation

* Change to not do annotations every single time

* Fill in orchestrator explorer for tests

* Go mod update

* Modify retry logic so it doesn't it for the entire update

* Fix go.mod

* Check in config crd stuff

* Remove hard coded product and update go.mod

* Revert go.mod back and fix errors

* Go.sum update

* overwrite cr by incoming data instead of appending to the old data (#1473)

* feedback

* feedback

* rename to OrchestratorK8sCRDRemoteConfig

---------

Co-authored-by: Kangyi LI <kangyi.li@datadoghq.com>
Co-authored-by: levan-m <116471169+levan-m@users.noreply.github.com>
@levan-m levan-m added the enhancement New feature or request label Oct 22, 2024
@levan-m levan-m added this to the v1.10.0 milestone Oct 22, 2024
@levan-m levan-m requested a review from a team as a code owner October 22, 2024 18:49
@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 9.81595% with 147 lines in your changes missing coverage. Please review.

Project coverage is 48.89%. Comparing base (92e60e4) to head (20ace33).

Files with missing lines Patch % Lines
pkg/remoteconfig/orchestrator_k8s_crd.go 0.00% 92 Missing ⚠️
pkg/remoteconfig/updater.go 0.00% 48 Missing ⚠️
...tadogagent/feature/orchestratorexplorer/feature.go 69.56% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##            v1.10    #1479      +/-   ##
==========================================
- Coverage   49.12%   48.89%   -0.24%     
==========================================
  Files         224      225       +1     
  Lines       19699    19821     +122     
==========================================
+ Hits         9678     9692      +14     
- Misses       9518     9626     +108     
  Partials      503      503              
Flag Coverage Δ
unittests 48.89% <9.81%> (-0.24%) ⬇️

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

Files with missing lines Coverage Δ
...tadogagent/feature/orchestratorexplorer/feature.go 77.48% <69.56%> (-1.75%) ⬇️
pkg/remoteconfig/updater.go 0.00% <0.00%> (ø)
pkg/remoteconfig/orchestrator_k8s_crd.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 92e60e4...20ace33. Read the comment docs.

@levan-m levan-m merged commit 37dbabd into v1.10 Oct 22, 2024
16 checks passed
@levan-m levan-m deleted the levan-m/cherry-pick-1340 branch October 22, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants