Skip to content

[CASCL-1386] (10/12) Evict ASG nodes#3169

Closed
L3n41c wants to merge 1 commit into
lenaic/CASCL-1386-evict-09-eks-mngfrom
lenaic/CASCL-1386-evict-10-asg
Closed

[CASCL-1386] (10/12) Evict ASG nodes#3169
L3n41c wants to merge 1 commit into
lenaic/CASCL-1386-evict-09-eks-mngfrom
lenaic/CASCL-1386-evict-10-asg

Conversation

@L3n41c

@L3n41c L3n41c commented Jun 18, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Implements ASG node eviction: cordon, drain, terminate the instances and lock the ASG to 0.

Motivation

PR #3026 is too large to review as a single change. This is part 10 of 12 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-eks-mng, not main, so the diff shows only this step's change. Implements logic that earlier stack parts left stubbed with panic("TODO …"). 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

PR 10 of a stack splitting #3026 into reviewable pieces. Builds and
passes tests on its own; the command is fully functional only once the
whole stack lands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@datadog-prod-us1-3

This comment has been minimized.

@codecov-commenter

codecov-commenter commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (lenaic/CASCL-1386-evict-09-eks-mng@8d7d306). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                          Coverage Diff                          @@
##             lenaic/CASCL-1386-evict-09-eks-mng    #3169   +/-   ##
=====================================================================
  Coverage                                      ?   44.52%           
=====================================================================
  Files                                         ?      391           
  Lines                                         ?    31457           
  Branches                                      ?        0           
=====================================================================
  Hits                                          ?    14005           
  Misses                                        ?    16547           
  Partials                                      ?      905           
Flag Coverage Δ
unittests 44.52% <100.00%> (?)

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/asg.go 100.00% <100.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 8d7d306...749ff4e. 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 deleted the branch lenaic/CASCL-1386-evict-09-eks-mng June 18, 2026 15:41
@L3n41c L3n41c closed this Jun 18, 2026
@L3n41c L3n41c deleted the lenaic/CASCL-1386-evict-10-asg branch June 18, 2026 15:41
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