• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes-sigs / karpenter / 30001588366
82%
main: 82%

Build:
Build:
LAST BUILD BRANCH: fix-allowed-disruptions-metric-staleness
DEFAULT BRANCH: main
Ran 23 Jul 2026 11:18AM UTC
Jobs 1
Files 179
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Jul 2026 11:01AM UTC coverage: 82.448% (+0.01%) from 82.435%
30001588366

Pull #3168

github

maks3201
fix: respect pod terminationGracePeriodSeconds when waiting after drain

MinDrainTime (5s) is used as the minimum wait between all pods being
evicted (deletionTimestamp set) and calling cloudProvider.Delete().
However, IsWaitingEviction() is a pure etcd/API check - it returns
false as soon as eviction is accepted, while the kubelet may still be
running the preStop hook for the pod's full terminationGracePeriodSeconds.

With the default tgps of 30s, Karpenter was calling EC2 TerminateInstances
~25s before preStop hooks could complete, causing:
  FailedPreStopHook
  FailedKillPod: ttrpc: closed

Fix: compute effectiveDrainTime as max(MinDrainTime, maxTGPS) across
pods still present on the node with deletionTimestamp set. MinDrainTime
is retained as the floor to preserve the original behavior of catching
late-scheduled pods.

Fixes: #1894
Pull Request #3168: fix: respect pod terminationGracePeriodSeconds when waiting after drain

14 of 16 new or added lines in 1 file covered. (87.5%)

37 existing lines in 1 file now uncovered.

16582 of 20112 relevant lines covered (82.45%)

97538.1 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
77.32
0.55% pkg/controllers/node/termination/controller.go

Coverage Regressions

Lines Coverage ∆ File
37
77.32
0.55% pkg/controllers/node/termination/controller.go
Jobs
ID Job ID Ran Files Coverage
1 30001588366.1 23 Jul 2026 11:18AM UTC 179
82.45
GitHub Action Run
Source Files on build 30001588366
  • Tree
  • List 179
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #3168
  • PR Base - main (#29941317487)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc