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

Fix daemonset status duplication in DDA when DS can't be created #1629

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

levan-m
Copy link
Contributor

@levan-m levan-m commented Jan 16, 2025

What does this PR do?

Fixes #1561

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

  1. Install older version of Operator
  2. Edit operator clusterrole and to restrict operator on Daemonsets - delete daemonsets in this definition:
...
- apiGroups:
  - apps
  resources:
  - daemonsets
  - deployments
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
...
  1. Apply minimal DDA and monitor status - observe DDA status with duplicates.
  agentList:
  - available: 0
    current: 0
    desired: 0
    ready: 0
    state: Failed
    status: Failed
    upToDate: 0
  - available: 0
    current: 0
    desired: 0
    ready: 0
    state: Failed
    status: Failed
    upToDate: 0
...
  1. Delete DDA.
  2. Upgrade Operator and reapply DDA.
  3. No duplicates in DDA status.

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

@levan-m levan-m added the bug Something isn't working label Jan 16, 2025
@levan-m levan-m added this to the v1.12.0 milestone Jan 16, 2025
@levan-m levan-m requested a review from a team as a code owner January 16, 2025 21:44
@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 27.50000% with 29 lines in your changes missing coverage. Please review.

Project coverage is 48.91%. Comparing base (bc3a576) to head (bbdf0b2).

Files with missing lines Patch % Lines
pkg/condition/condition.go 24.24% 24 Missing and 1 partial ⚠️
...ler/datadogagent/controller_reconcile_v2_common.go 20.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1629      +/-   ##
==========================================
+ Coverage   48.82%   48.91%   +0.09%     
==========================================
  Files         217      217              
  Lines       20874    20872       -2     
==========================================
+ Hits        10191    10209      +18     
+ Misses      10147    10125      -22     
- Partials      536      538       +2     
Flag Coverage Δ
unittests 48.91% <27.50%> (+0.09%) ⬆️

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

Files with missing lines Coverage Δ
...troller/datadogagent/controller_reconcile_agent.go 53.44% <100.00%> (ø)
...ler/datadogagent/controller_reconcile_v2_common.go 29.96% <20.00%> (ø)
pkg/condition/condition.go 13.76% <24.24%> (+8.30%) ⬆️

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 bc3a576...bbdf0b2. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug DatadogAgent CRD status agent list bloated causing etcdserver request too large
2 participants