Skip to content

Commit 96d5867

Browse files
committed
refactor: drop dead affinity package and the metrics it owned
The affinity package (picker, store, reaper, ~310 lines of test) was fully implemented but had zero callers — main.go didn't wire it, config/rbac/role.yaml didn't grant ConfigMap permissions, and the package doc on main.go was the only thing claiming the webhook 'owns the per-pool node-affinity reservation store.' Cocoon-specs flagged it as dead code in the recent /code review. Delete the package, drop the now-unused affinity_reservations_total / affinity_releases_total prometheus counters and their RecordReservation / RecordRelease helpers, drop the unused 'pool' label constant, and fix the package doc on main.go. go.mod / go.sum tidy: github.com/ google/go-cmp and pmezard/go-difflib were pulled in transitively by the affinity tests and are no longer referenced. If we ever wire affinity reservations again, it'll be on a fresh design (probably with proper RBAC up-front and a chosen storage layer); the deleted code optimised for ConfigMap-as-store which is not necessarily what we want.
1 parent 6c2da68 commit 96d5867

9 files changed

Lines changed: 10 additions & 855 deletions

File tree

affinity/affinity_test.go

Lines changed: 0 additions & 249 deletions
This file was deleted.

0 commit comments

Comments
 (0)