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

Revert "[cleanup] remove unused v1beta1 version of PDB (#1468)" #1580

Merged
merged 7 commits into from
Dec 19, 2024

Conversation

swang392
Copy link
Contributor

@swang392 swang392 commented Dec 18, 2024

What does this PR do?

  • This reverts commit 614b10f (https://github.com/DataDog/datadog-operator/pull/1468/files) which removed support for v1beta1

  • This modifies create Pod Disruption Budget for DCA and CCR deployments #1454 to use v1beta1 when necessary to create the PDBs (otherwise, the simple revert leads to logs such as:

    {"level":"ERROR","ts":"2024-12-19T08:40:06.364Z","msg":"Reconciler error","controller":"datadogagent","controllerGroup":"datadoghq.com","controllerKind":"DatadogAgent","DatadogAgent":{"name":"datadog","namespace":"default"},"namespace":"default","name":"datadog","reconcileID":"b03cf54b-e5d7-415e-8c21-10c12ad8c066","error":"no matches for kind \"PodDisruptionBudget\" in version \"policy/v1\"","errorCauses":[{"error":"no matches for kind \"PodDisruptionBudget\" in version \"policy/v1\""},{"error":"no matches for kind \"PodDisruptionBudget\" in version \"policy/v1\""}]

Motivation

make integration-test fails here: https://github.com/DataDog/helm-charts/actions/runs/12395102380/job/34600023919?pr=1641 because of removal of v1beta1

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

Same QA instructions for #1454, but also test with k8s 1.18

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

pkg/kubernetes/platforminfo.go Outdated Show resolved Hide resolved
pkg/kubernetes/platforminfo.go Outdated Show resolved Hide resolved
pkg/equality/equality.go Outdated Show resolved Hide resolved
@swang392 swang392 added this to the v1.11.0 milestone Dec 18, 2024
@swang392 swang392 added the bug Something isn't working label Dec 18, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 24.59016% with 46 lines in your changes missing coverage. Please review.

Project coverage is 48.56%. Comparing base (6f3a79f) to head (410cf7b).

Files with missing lines Patch % Lines
...oller/datadogagent/component/clusteragent/utils.go 12.50% 13 Missing and 1 partial ⚠️
...adogagent/component/clusterchecksrunner/default.go 12.50% 13 Missing and 1 partial ⚠️
pkg/kubernetes/platforminfo.go 33.33% 10 Missing ⚠️
pkg/equality/equality.go 0.00% 6 Missing ⚠️
pkg/kubernetes/objects.go 0.00% 1 Missing ⚠️
pkg/kubernetes/objectslist.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1580      +/-   ##
==========================================
- Coverage   48.65%   48.56%   -0.09%     
==========================================
  Files         226      226              
  Lines       20385    20435      +50     
==========================================
+ Hits         9919     9925       +6     
- Misses       9947     9989      +42     
- Partials      519      521       +2     
Flag Coverage Δ
unittests 48.56% <24.59%> (-0.09%) ⬇️

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

Files with missing lines Coverage Δ
...l/controller/datadogagent/override/dependencies.go 56.98% <100.00%> (+0.94%) ⬆️
.../controller/datadogagent/testutils/client_utils.go 100.00% <ø> (ø)
internal/controller/datadogagent_controller.go 67.59% <100.00%> (+0.30%) ⬆️
pkg/kubernetes/objects.go 0.00% <0.00%> (ø)
pkg/kubernetes/objectslist.go 0.00% <0.00%> (ø)
pkg/equality/equality.go 7.05% <0.00%> (-0.29%) ⬇️
pkg/kubernetes/platforminfo.go 64.28% <33.33%> (-8.45%) ⬇️
...oller/datadogagent/component/clusteragent/utils.go 22.50% <12.50%> (-5.86%) ⬇️
...adogagent/component/clusterchecksrunner/default.go 9.58% <12.50%> (-1.10%) ⬇️

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 6f3a79f...410cf7b. Read the comment docs.

@swang392 swang392 marked this pull request as ready for review December 19, 2024 03:19
@swang392 swang392 requested a review from a team as a code owner December 19, 2024 03:19
@swang392 swang392 merged commit c17ec1d into main Dec 19, 2024
19 checks passed
@swang392 swang392 deleted the swang392/revert-v1beta1 branch December 19, 2024 15:32
tbavelier added a commit that referenced this pull request Dec 19, 2024
* Revert "[cleanup] remove unused v1beta1 version of PDB (#1468)"

This reverts commit 614b10f.

* use go convention

* support v1beta1 for pdbs

* go convetion

* Revert "support v1beta1 for pdbs"

This reverts commit 13b2cab.

* Reapply "support v1beta1 for pdbs"

This reverts commit 59715f1.

---------

Co-authored-by: Timothée Bavelier <timothee.bavelier@datadoghq.com>
Co-authored-by: Timothée Bavelier <97530782+tbavelier@users.noreply.github.com>
tbavelier added a commit that referenced this pull request Dec 19, 2024
… (#1582)

* Revert "[cleanup] remove unused v1beta1 version of PDB (#1468)"

This reverts commit 614b10f.

* use go convention

* support v1beta1 for pdbs

* go convetion

* Revert "support v1beta1 for pdbs"

This reverts commit 13b2cab.

* Reapply "support v1beta1 for pdbs"

This reverts commit 59715f1.

---------

Co-authored-by: Sarah Wang <sarah.wang@datadoghq.com>
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.

4 participants