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

kubernetes-sigs / karpenter / 22731997742
78%
main: 80%

Build:
Build:
LAST BUILD BRANCH: fix/topology-spread-nodepool-zone-filtering
DEFAULT BRANCH: main
Ran 05 Mar 2026 07:12PM UTC
Jobs 1
Files 158
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

05 Mar 2026 06:49PM UTC coverage: 77.673% (-2.6%) from 80.275%
22731997742

Pull #2894

github

nathangeology
feat(pod): Add feature-gated pod deletion cost management controller

Introduce a new controller that manages pod-deletion-cost annotations
on pods scheduled to Karpenter-managed nodes. This influences which
pods the Kubernetes scheduler prefers to evict during consolidation,
enabling smarter disruption decisions.

The controller is gated behind the PodDeletionCostManagement feature
flag (default: disabled) and supports configurable ranking strategies:
- Random: random cost assignment
- LargestToSmallest: prefer evicting larger pods first
- SmallestToLargest: prefer evicting smaller pods first
- UnallocatedVCPUPerPodCost: rank by unallocated vCPU per pod

Key components:
- controller.go: reconciliation loop watching Karpenter nodes
- ranking.go: pluggable ranking strategies for cost calculation
- annotation.go: pod annotation management with batch updates
- changedetector.go: optimization to skip unchanged node states
- events.go/metrics.go: observability for ranking operations

Infrastructure changes:
- Add PodDeletionCostManagement feature gate to options.go
- Add ranking strategy and change detection CLI flags
- Register controller conditionally in controllers.go
- Add pod update/patch RBAC to kwok clusterrole
- Add example env vars to kwok chart values
Pull Request #2894: feat: Add feature-gated pod deletion cost management controller

13 of 515 new or added lines in 7 files covered. (2.52%)

4 existing lines in 2 files now uncovered.

12079 of 15551 relevant lines covered (77.67%)

117170.07 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
0.0
0.0% pkg/controllers/controllers.go
27
0.0
pkg/controllers/pod/deletioncost/events.go
72
0.0
pkg/controllers/pod/deletioncost/controller.go
84
0.0
pkg/controllers/pod/deletioncost/changedetector.go
108
0.0
pkg/controllers/pod/deletioncost/annotation.go
208
0.0
pkg/controllers/pod/deletioncost/ranking.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% pkg/controllers/controllers.go
3
90.14
-1.06% pkg/controllers/provisioning/scheduling/nodeclaim.go
Jobs
ID Job ID Ran Files Coverage
1 22731997742.1 05 Mar 2026 07:12PM UTC 158
77.67
GitHub Action Run
Source Files on build 22731997742
  • Tree
  • List 158
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #2894
  • PR Base - main (#22681812192)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc