Commit Graph
2 Commits
Author SHA1 Message Date
Aleksei Sviridkin f5d8249d3a test(gpu): pin comparison tolerations, sidecar order and hashed names
The rule that Gt and Lt tolerations never tolerate a taint had no case,
nor did an init container that finishes before a sidecar starts, and
the long-name check compared a pure function with itself. Each now has
a case that fails when the behaviour changes, the long name against a
hash computed outside the code under test.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-10-20 16:00:04 +03:00
Aleksei Sviridkin 5d90af051b feat(gpu): add the shared GPU placement and budget model
The binder re-checks what admission checked, and cozystack-api shows
the remaining budget a later order is checked against; computing these
in three places would let them disagree. The model is pure, so each
caller builds a snapshot from its own cache.

GPU budgets cap the whole subtree of the tenant that declares them,
walked over the namespace ancestry and independent of the tenant quota
pools. A raw GPU key blocks a class until the same tenant also declares
a GPU key, and then caps devices and raw-name pods together.

A node takes binds only when it is schedulable, Ready and carries no
NoSchedule or NoExecute taint the pod does not tolerate; the
node.kubernetes.io taints are left to the first two checks, and a
taint never counts as a cordon.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-10-20 15:36:10 +03:00