Files
cozystack/internal/gpu
Aleksei Sviridkin 33939c6f03 feat(gpu): turn class entries into KubeVirt GPU entries at VMI admission
KubeVirt derives launcher requests from the admitted VMI and does not
allow another controller to change that spec afterwards. Class
resolution and offer validation must therefore finish at VMI creation. A
resource outside permittedHostDevices otherwise leaves a VMI Pending
without a pod. Resolving from uncached reads avoids admitting against an
obsolete class or entitlement. A ResourceNameConflict condition may be
stale either way, so ownership comes from the live class list: a class
is admitted only while it uniquely holds, and has acknowledged, the
exact resource name it requests.

Capacity shortages belong to the scheduler: refusing admission would put
a VM into KubeVirt's retry backoff instead of starting it when a unit
frees up. Tenant-controlled per-unit expansion still needs a fixed
safety bound to prevent a small annotation from exhausting controller
memory.

A guest needs its class's license without embedding the token in an
image or changing which disk boots. Class tolerations must survive
LiveUpdate, which resets VMI tolerations from the VM template; the
launcher pod is the stable place to apply them. Migration and volume-
binding pods need the same scheduling access.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-28 09:25:41 +03:00
..