feat(scheduler): integrate SchedulingClass support for tenant workloads by sircthulhu · Pull Request #2223 · cozystack/cozystack
added 5 commits
March 15, 2026 22:00Allow administrators to assign a SchedulingClass CR to a tenant. The schedulingClass is inherited by child tenants and cannot be overridden once set by a parent. Assisted-By: Claude AI Signed-off-by: Kirill Ilin <stitch14@yandex.ru>
Add an API-backed listInput dropdown for the schedulingClass field in the Tenant creation form. The dropdown lists available SchedulingClass CRs from cozystack.io/v1alpha1. Assisted-By: Claude AI Signed-off-by: Kirill Ilin <stitch14@yandex.ru>
The label is read by the lineage-controller-webhook to inject schedulerName and scheduling-class annotation into all pods in the tenant namespace. Assisted-By: Claude AI Signed-off-by: Kirill Ilin <stitch14@yandex.ru>
When a namespace carries the scheduling.cozystack.io/class label, the webhook injects schedulerName=cozystack-scheduler and the scheduler.cozystack.io/scheduling-class annotation into every Pod. This covers all workloads in the tenant namespace regardless of whether the operator CRD supports schedulerName natively. Assisted-By: Claude AI Signed-off-by: Kirill Ilin <stitch14@yandex.ru>
Before injecting schedulerName and annotation, the webhook now checks that the referenced SchedulingClass CR actually exists. If the CRD is not installed or the CR is missing, injection is skipped so that pods are not stuck Pending on a non-existent scheduler. Assisted-By: Claude AI Signed-off-by: Kirill Ilin <stitch14@yandex.ru>
…eduler Import SchedulingClassAnnotation, SchedulingClassLabel, SchedulerName, and GVR components from the cozystack-scheduler/pkg/apis sub-module instead of defining them locally. This ensures the webhook and scheduler stay in sync on label/annotation keys. Also standardize the namespace label from scheduling.cozystack.io/class to scheduler.cozystack.io/scheduling-class for consistency with the scheduler, and resolve scheduling class from the owner Application CR (via a new SchedulingClass() stub method) before falling back to the namespace label. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
lllamnyp
deleted the
feat/scheduler-integration
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters