Skip to content

[CASCL-1386] (10/11) Evict Karpenter user NodePools#3177

Draft
L3n41c wants to merge 1 commit into
lenaic/CASCL-1386-evict-09-standalonefrom
lenaic/CASCL-1386-evict-10-karpenter-user
Draft

[CASCL-1386] (10/11) Evict Karpenter user NodePools#3177
L3n41c wants to merge 1 commit into
lenaic/CASCL-1386-evict-09-standalonefrom
lenaic/CASCL-1386-evict-10-karpenter-user

Conversation

@L3n41c

@L3n41c L3n41c commented Jun 18, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Implements Karpenter user NodePool eviction: cordon and drain (Karpenter reclaims the emptied instances).

Motivation

PR #3026 is too large to review as a single change. This is part 10 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-09-standalone, not main, so the diff shows only this step's change. Reuses the drain primitives 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-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jun 18, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

DataDog/datadog-operator | unit_tests   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: 4fbbbac | Docs | Datadog PR Page | Give us feedback!

@codecov-commenter

codecov-commenter commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.42%. Comparing base (a29e4e3) to head (f21be8d).

Files with missing lines Patch % Lines
...atadog/autoscaling/cluster/evict/karpenter_user.go 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                            Coverage Diff                            @@
##           lenaic/CASCL-1386-evict-09-standalone    #3177      +/-   ##
=========================================================================
+ Coverage                                  44.41%   44.42%   +0.01%     
=========================================================================
  Files                                        391      391              
  Lines                                      31316    31322       +6     
=========================================================================
+ Hits                                       13908    13914       +6     
+ Misses                                     16509    16508       -1     
- Partials                                     899      900       +1     
Flag Coverage Δ
unittests 44.42% <71.42%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
...atadog/autoscaling/cluster/evict/karpenter_user.go 75.00% <71.42%> (+75.00%) ⬆️

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 a29e4e3...f21be8d. 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-10-karpenter-user branch from e6ebd52 to c0b814f Compare June 19, 2026 14:21
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-09-standalone branch from 97fffd2 to c3fcaa0 Compare June 19, 2026 14:21
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-10-karpenter-user branch from c0b814f to 08904e2 Compare June 19, 2026 14:45
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-09-standalone branch 2 times, most recently from 403189a to ae903f8 Compare June 22, 2026 13:24
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-10-karpenter-user branch from 08904e2 to 43a0d78 Compare June 22, 2026 13:25
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-09-standalone branch from ae903f8 to 4e1f9b8 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-09-standalone branch from 4e1f9b8 to e551e5a 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-09-standalone branch from e551e5a to a29e4e3 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-09-standalone branch from a29e4e3 to 05eef42 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