Skip to content

[CASCL-1386] (11/11) Create temporary PodDisruptionBudgets during eviction#3178

Draft
L3n41c wants to merge 1 commit into
lenaic/CASCL-1386-evict-10-karpenter-userfrom
lenaic/CASCL-1386-evict-11-pdb
Draft

[CASCL-1386] (11/11) Create temporary PodDisruptionBudgets during eviction#3178
L3n41c wants to merge 1 commit into
lenaic/CASCL-1386-evict-10-karpenter-userfrom
lenaic/CASCL-1386-evict-11-pdb

Conversation

@L3n41c

@L3n41c L3n41c commented Jun 18, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Implements creation and label-based cleanup of temporary PodDisruptionBudgets (maxUnavailable: 1) that protect cross-group workloads during the drain.

Motivation

PR #3026 is too large to review as a single change. This is part 11 of 11 of a stack that splits it into small, individually-reviewable pieces that each build and pass tests on their own. See #3026 for the full feature context and end-to-end QA.

Additional Notes

Stacked PR — the base branch is lenaic/CASCL-1386-evict-10-karpenter-user, not main, so the diff shows only this step's change. Lands last because its controller discovery (discoverControllers) reuses the shouldSkipEviction predicate introduced in part 8. The code is taken verbatim from #3026 (rebased onto main); there are no logic changes versus #3026.

Minimum Agent Versions

N/A — kubectl-datadog plugin only.

Describe your test plan

go test ./cmd/kubectl-datadog/autoscaling/cluster/... passes at this commit. Full end-to-end QA is tracked on #3026.

Checklist

@datadog-official

datadog-official Bot commented Jun 18, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 3 Pipeline jobs failed

DataDog/datadog-operator | build   View in Datadog   GitLab

DataDog/datadog-operator | e2e_autoscaling   View in Datadog   GitLab

validation | build   View in Datadog   GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8b7a293 | Docs | Datadog PR Page | Give us feedback!

@codecov-commenter

codecov-commenter commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.23077% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.57%. Comparing base (e6ebd52) to head (6a978ac).

Files with missing lines Patch % Lines
...d/kubectl-datadog/autoscaling/cluster/evict/pdb.go 69.23% 44 Missing and 8 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                              Coverage Diff                              @@
##           lenaic/CASCL-1386-evict-10-karpenter-user    #3178      +/-   ##
=============================================================================
+ Coverage                                      44.41%   44.57%   +0.15%     
=============================================================================
  Files                                            391      391              
  Lines                                          31316    31483     +167     
=============================================================================
+ Hits                                           13910    14033     +123     
- Misses                                         16508    16544      +36     
- Partials                                         898      906       +8     
Flag Coverage Δ
unittests 44.57% <69.23%> (+0.15%) ⬆️

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

Files with missing lines Coverage Δ
...d/kubectl-datadog/autoscaling/cluster/evict/pdb.go 69.00% <69.23%> (+69.00%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6ebd52...6a978ac. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-11-pdb branch from 6a978ac to 1a070c5 Compare June 19, 2026 14:21
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-10-karpenter-user branch from e6ebd52 to c0b814f Compare June 19, 2026 14:21
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-11-pdb branch from 1a070c5 to 3cdcaf0 Compare June 19, 2026 14:45
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-10-karpenter-user branch 2 times, most recently from 08904e2 to 43a0d78 Compare June 22, 2026 13:25
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-11-pdb branch from 3cdcaf0 to 2b49dd2 Compare June 22, 2026 13:25
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-11-pdb branch from 2b49dd2 to d88c10a Compare June 23, 2026 08:49
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-10-karpenter-user branch from 43a0d78 to 1505efe Compare June 23, 2026 08:49
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-11-pdb branch from d88c10a to 6b94424 Compare June 25, 2026 08:18
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-10-karpenter-user branch 2 times, most recently from 045f39b to f21be8d Compare June 26, 2026 12:16
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-11-pdb branch from 6b94424 to d391f26 Compare June 26, 2026 12:16
Part of a stack splitting #3026 (too large to review in one piece) into
small pieces that each build and pass tests on their own. The command is
fully functional only once the whole stack lands.
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-10-karpenter-user branch from f21be8d to 4fbbbac Compare June 26, 2026 14:45
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-11-pdb branch from d391f26 to 8b7a293 Compare June 26, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants