[CASCL-1386] (8/11) Add node drain primitives and evict ASG nodes#3175
Draft
L3n41c wants to merge 1 commit into
Draft
[CASCL-1386] (8/11) Add node drain primitives and evict ASG nodes#3175L3n41c wants to merge 1 commit into
L3n41c wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## lenaic/CASCL-1386-evict-07-eks-mng #3175 +/- ##
======================================================================
+ Coverage 44.11% 44.36% +0.24%
======================================================================
Files 389 391 +2
Lines 31119 31283 +164
======================================================================
+ Hits 13729 13878 +149
- Misses 16498 16508 +10
- Partials 892 897 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
22c07f1 to
5bad6e2
Compare
c0c8b6a to
9250b71
Compare
5bad6e2 to
e2962ee
Compare
9250b71 to
f9c10d1
Compare
e2962ee to
0b04574
Compare
5 tasks
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.
f9c10d1 to
8e43ad1
Compare
0b04574 to
1e9f157
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Introduces the shared node-drain primitives — node cordoning (
cordonNodes), pod eviction/draining (drainNode) and the pod-eligibility predicates (shouldSkipEviction…) — together with their first consumer, ASG eviction (cordon, drain, terminate the instances, lock the ASG to 0).Motivation
PR #3026 is too large to review as a single change. This is part 8 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-07-eks-mng, notmain, so the diff shows only this step's change. The drain primitives are bundled with the ASG evictor on purpose:golangci-lint'sunusedlinter rejects an unexported helper that has no caller in the same commit, so the primitives land in the same PR as the first evictor that calls them. Parts 9–10 reuse them. The code is taken verbatim from #3026 (rebased ontomain); there are no logic changes versus #3026.Minimum Agent Versions
N/A —
kubectl-datadogplugin 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
qa/skip-qalabel applied (not independently shippable; QA tracked on [CASCL-1386] Add evict-legacy-nodes subcommand to drain non-Datadog node groups #3026)