Files
cozystack/api/apps/v1alpha1
Aleksei Sviridkin 77a02d2e3a feat(tenant): add the vGPU entitlement, keep GPU budgets out of quotas
A vGPU class may be used only by an entitled tenant, and no tenant may
grant itself the entitlement. The Tenant field gpu.vgpu is set by the
parent's administrator, so the effective value is the field and the
parent's value together, and it reaches the namespace as the
namespace.cozystack.io/vgpu label. The label is always written, so
only "true" entitles and a missing label cannot be read as consent.
_namespace.vgpu is written only when entitled, since every app in the
tenant reads that Secret and an always-present key would upgrade them
all.

GPU budget keys in the gpuclass.cozystack.io domain are checked when
a VM or a worker pool is written, not against pods, so they are
dropped before the ResourceQuota render, and a tenant with only GPU
budgets gets no ResourceQuota or LimitRange. The domain test matches
the one the API server uses, so a malformed budget key never becomes
a pod quota either.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-28 07:08:38 +03:00
..