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

add generation changed predicate to datadogagent controller #1266

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

celenechang
Copy link
Contributor

@celenechang celenechang commented Jul 3, 2024

What does this PR do?

Add GenerationChanged predicate to DatadogAgent controller to prevent Status updates from triggering reconciles on the resource.

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

  • Deploy the latest Datadog Operator and apply a DatadogAgent manifest

  • View the logs to see reconcile frequency (Reconciling DatadogAgent). It is expected to be at least twice per second, every 15s.

  • Deploy the test image

  • Check the reconcile frequency. The number of reconciles should be reduced (in my test environment, it went down to once every 15s).

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

@celenechang celenechang added the enhancement New feature or request label Jul 3, 2024
@celenechang celenechang added this to the v1.8.0 milestone Jul 3, 2024
@celenechang celenechang requested review from a team as code owners July 3, 2024 14:44
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 54.85%. Comparing base (87546e6) to head (2ecc870).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1266      +/-   ##
==========================================
- Coverage   54.87%   54.85%   -0.02%     
==========================================
  Files         241      241              
  Lines       27893    27893              
==========================================
- Hits        15305    15302       -3     
- Misses      11717    11719       +2     
- Partials      871      872       +1     
Flag Coverage Δ
unittests 54.85% <0.00%> (-0.02%) ⬇️

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

Files Coverage Δ
controllers/datadogagent_controller.go 68.14% <0.00%> (-2.66%) ⬇️

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 87546e6...2ecc870. Read the comment docs.

@celenechang celenechang modified the milestones: v1.8.0, v1.9.0 Jul 9, 2024
@levan-m levan-m modified the milestones: v1.9.0, v1.10.0 Aug 26, 2024
@khewonc khewonc modified the milestones: v1.9.0, v1.10.0 Sep 3, 2024
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.

4 participants