fix(overhead): cap overhead at capacity #30

Merged
mikluko merged 2 commits from overhead-cap into main 2026-11-28 13:46:31 +00:00
Owner

overhead.For caps each resource's overhead at the instance's capacity, filling kube-reserved, then system-reserved, then eviction, each taking what's left, so Karpenter core's InstanceType.Allocatable() (capacity minus For's overhead) bottoms out at 0 and agrees with overhead.Allocatable (hetzner: a 64Gi reservation on a 1Gi type gave −63588Mi). Within capacity nothing changes. Also fixes a flaky catalogue test that compared set-ordered Requirement values as a slice (failed ~1 in 10).

🤖 Generated with Claude Code

overhead.For caps each resource's overhead at the instance's capacity, filling kube-reserved, then system-reserved, then eviction, each taking what's left, so Karpenter core's InstanceType.Allocatable() (capacity minus For's overhead) bottoms out at 0 and agrees with overhead.Allocatable (hetzner: a 64Gi reservation on a 1Gi type gave −63588Mi). Within capacity nothing changes. Also fixes a flaky catalogue test that compared set-ordered Requirement values as a slice (failed ~1 in 10). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Karpenter core subtracts KubeReserved + SystemReserved + EvictionThreshold
from capacity itself, so a reservation above capacity made InstanceType
Allocatable negative; only overhead.Allocatable clamped. For now fills each
resource in order kube-reserved, system-reserved, eviction, each taking at
most what is left.

Assisted-By: Claude <noreply@anthropic.com>
test(catalogue): compare requirement values as a set
All checks were successful
CI / verify (push) Has been skipped
CI / changelog (push) Has been skipped
Vulnerabilities / govulncheck-1 (push) Successful in 36s
Vulnerabilities / govulncheck (push) Successful in 0s
CI / ci (pull_request) Successful in 0s
CI / ci (push) Successful in 0s
CI / check (pull_request) Successful in 3m46s
CI / check (push) Successful in 1m44s
CI / verify (pull_request) Has been skipped
CI / changelog (pull_request) Successful in 3s
Vulnerabilities / govulncheck-1 (pull_request) Successful in 29s
Vulnerabilities / govulncheck (pull_request) Successful in 0s
6fbcb2c28f
Assisted-By: Claude <noreply@anthropic.com>
mikluko deleted branch overhead-cap 2026-11-28 13:46:31 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
karpenter/kit!30
No description provided.