Files
Aleksei Sviridkin d07dcb0b78 feat(cozystack-controller): wire the GPU controller and its flags
The GPU reconciler always runs, so GPU finalizers and usage records are
handled on every cluster, including ones that later turn GPU off;
--enable-gpu adds placement and the KubeVirt watches. GPU admission
webhooks are registered only with it, because asking the manager for
its webhook server starts it and the server needs a serving
certificate. The hoster's resource-name list and raw-name policy come
in as flags and are written to the settings ConfigMap for the
admission policies to read.

GPU admission has to answer from warm caches, so with GPU enabled
every replica starts the informers it needs before the manager rather
than at the first admission, and readiness waits for exactly those to
sync. It does not wait for KubeVirt, whose kinds a fresh install
serves only after this controller is ready; those informers start once
the kinds are served. The leader releases its lease on shutdown so a
rollout does not leave starting VMs gated for a lease duration. The
ConfigMap cache holds only the settings object. Non-positive grace
periods are refused, since a zero attachment grace would clear every
attachment before its VMI appears.

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